Замораживание приложения Python / PySide2 с fbs возвращает ошибку - как это исправить? - PullRequest
0 голосов
/ 31 октября 2019

В своей первой попытке я смог «заморозить» программу Python на своем Mac с несколькими ошибками, но, читая документацию fbs, я начал возиться с версиями Python, поскольку одна из них, которую я использовал, былаверсия 3.7, и рекомендация - версия 3.5 / 3.6. Результат - теперь я не могу больше заморозить программу. НЕ ИЗМЕНЯЙТЕ КОМАНДУ ВЫИГРЫША!: - /

Я начал с удаления установки Anaconda, которая имела версию Python, которую я использовал. После этого я попытался установить и 3.5.8rc1, 3.6.9, и 3.7.4 через «pyenv», и кроме первой версии я могу запустить программу, но не заморозить ее. 3.5.8rc1 появляется с ошибкой, когда я пытаюсь запустить его, а 2 другие только не замирают. Это сработало вчера, поэтому есть надежда, но я потерял обзор, и сейчас я немного расстроен :-), поэтому я надеюсь, что найдется кто-нибудь, кто сможет помочь решить проблему. Я приложил сообщение об ошибке для fbs freeze с Python 3.7.4.

Заранее спасибо.

    (venv) Thomass-MacBook-Pro-3:python37_RNP_app thomas$ fbs freeze
9667 ERROR: Can not find path ./libshiboken2.abi3.5.13.dylib (needed by /Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PySide2/QtWidgets.abi3.so)
10147 ERROR: Can not find path ./libshiboken2.abi3.5.13.dylib (needed by /Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PySide2/QtGui.abi3.so)
10174 ERROR: Can not find path ./libshiboken2.abi3.5.13.dylib (needed by /Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PySide2/QtNetwork.abi3.so)
10642 ERROR: Can not find path ./libshiboken2.abi3.5.13.dylib (needed by /Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PySide2/QtCore.abi3.so)
11546 ERROR: Can not find path ./libshiboken2.abi3.5.13.dylib (needed by /Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PySide2/QtCharts.abi3.so)
11549 ERROR: Can not find path ./libshiboken2.abi3.5.13.dylib (needed by /Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PySide2/QtNetwork.abi3.so)
11557 ERROR: Can not find path ./libshiboken2.abi3.5.13.dylib (needed by /Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PySide2/QtWidgets.abi3.so)
11561 ERROR: Can not find path ./libshiboken2.abi3.5.13.dylib (needed by /Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PySide2/QtCore.abi3.so)
11564 ERROR: Can not find path ./libshiboken2.abi3.5.13.dylib (needed by /Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PySide2/QtGui.abi3.so)
12142 ERROR: Can not find path ./libshiboken2.abi3.5.13.dylib (needed by /Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PySide2/libpyside2.abi3.5.13.dylib)
Traceback (most recent call last):
  File "/Users/thomas/Documents/python37_RNP_app/venv/bin/pyinstaller", line 10, in <module>
    sys.exit(run())
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PyInstaller/__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PyInstaller/__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 844, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 791, in build
    exec(code, spec_namespace)
  File "/Users/thomas/Documents/python37_RNP_app/target/PyInstaller/RNP_test_app.spec", line 17, in <module>
    noarchive=False)
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 243, in __init__
    self.__postinit__()
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__
    self.assemble()
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 575, in assemble
    self._check_python_library(self.binaries)
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 681, in _check_python_library
    raise IOError(msg)
OSError: Python library not found: Python, .Python, libpython3.7.dylib, libpython3.7m.dylib
This would mean your Python installation doesn't come with proper library files.
This usually happens by missing development package, or unsuitable build parameters of Python installation.

* On Debian/Ubuntu, you would need to install Python development packages
  * apt-get install python3-dev
  * apt-get install python-dev
* If you're building Python by yourself, please rebuild your Python with `--enable-shared` (or, `--enable-framework` on Darwin)

Traceback (most recent call last):
  File "/Users/thomas/Documents/python37_RNP_app/venv/bin/fbs", line 11, in <module>
    load_entry_point('fbs==0.8.4', 'console_scripts', 'fbs')()
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/fbs/__main__.py", line 17, in _main
    fbs.cmdline.main()
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/fbs/cmdline.py", line 32, in main
    fn(*args)
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/fbs/builtin_commands/__init__.py", line 114, in freeze
    freeze_mac(debug=debug)
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/fbs/freeze/mac.py", line 22, in freeze_mac
    run_pyinstaller(args, debug)
  File "/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/fbs/freeze/__init__.py", line 47, in run_pyinstaller
    run(args, check=True)
  File "/Users/thomas/.pyenv/versions/3.7.4/lib/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'RNP_test_app', '--noupx', '--log-level', 'ERROR', '--noconfirm', '--windowed', '--icon', '/Users/thomas/Documents/python37_RNP_app/target/Icon.icns', '--distpath', '/Users/thomas/Documents/python37_RNP_app/target', '--specpath', '/Users/thomas/Documents/python37_RNP_app/target/PyInstaller', '--workpath', '/Users/thomas/Documents/python37_RNP_app/target/PyInstaller', '--additional-hooks-dir', '/Users/thomas/Documents/python37_RNP_app/venv/lib/python3.7/site-packages/fbs/freeze/hooks', '--runtime-hook', '/Users/thomas/Documents/python37_RNP_app/target/PyInstaller/fbs_pyinstaller_hook.py', '/Users/thomas/Documents/python37_RNP_app/src/main/python/main.py']' returned non-zero exit status 1.
...