用fbs冻结Python / PySide2应用程序会返回错误-如何解决?

时间:2019-10-31 13:35:44

标签: python pyside2 fbs

在我的第一次尝试中,我只能在Mac上“冻结”一个Python程序,但仅有一些错误,但是当我阅读fbs文档时,我开始搞乱Python版本,因为我使用的是版本3.7,建议使用版本3.5 / 3.6。结果–现在我无法冻结该程序了。请勿更改获胜团队!:-/

我首先删除了自己的Anaconda安装,该安装具有我使用的Python版本。之后,我尝试通过“ pyenv”安装3.5.8rc1、3.6.9和3.7.4,除了第一个版本,我可以运行该程序,但不能冻结它。当我尝试运行3.5.8rc1时出现错误,而其他2个仅在冻结时失败。 昨天它确实有效,所以有希望,但是我失去了概述,现在有点沮丧:-),所以我希望那里有人可以帮助解决问题。我已经附上了使用Python 3.7.4冻结fbs的错误消息。

谢谢。

    (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.

0 个答案:

没有答案