python oserror路径not found_pyinstaller错误:OSError:找不到Python库:libpython3.4mu.so.1.0,libpython3.4m.so.1....

我在Centos7上使用Python3.4.4。

我在本地机器上创建了一个python程序,它使用qt模块。程序在我的本地计算机上运行良好。

我现在正试图用pyinstaller创建一个可执行文件。我使用的命令是:pyinstaller main.py

我得到以下输出:40 INFO: PyInstaller: 3.2.1

40 INFO: Python: 3.4.4

41 INFO: Platform: Linux-3.10.0-327.36.3.el7.x86_64-x86_64-with-centos-7.3.1611-Core

41 INFO: wrote /home/neilharris/Documents/Python_Projects/transcoder/main.spec

42 INFO: UPX is not available.

44 INFO: Extending PYTHONPATH with paths

['/home/neilharris/Documents/Python_Projects/transcoder',

'/home/neilharris/Documents/Python_Projects/transcoder']

44 INFO: checking Analysis

44 INFO: Building Analysis because out00-Analysis.toc is non existent

44 INFO: Initializing module dependency graph...

45 INFO: Initializing module graph hooks...

47 INFO: Analyzing base_library.zip ...

1869 INFO: Processing pre-find module path hook distutils

3030 INFO: running Analysis out00-Analysis.toc

3039 INFO: Caching module hooks...

3046 INFO: Analyzing /home/neilharris/Documents/Python_Projects/transcoder/main.py

3089 INFO: Loading module hooks...

3089 INFO: Loading module hook "hook-xml.py"...

3353 INFO: Loading module hook "hook-encodings.py"...

3437 INFO: Loading module hook "hook-PyQt4.py"...

3438 INFO: Loading module hook "hook-distutils.py"...

3440 INFO: Loading module hook "hook-PyQt4.QtCore.py"...

3575 INFO: Loading module hook "hook-pydoc.py"...

3576 INFO: Loading module hook "hook-PyQt4.QtGui.py"...

3849 INFO: Looking for ctypes DLLs

3861 INFO: Analyzing run-time hooks ...

3867 INFO: Including run-time hook 'pyi_rth_qt4plugins.py'

3877 INFO: Looking for dynamic libraries

ldd: warning: you do not have execution permission for `/usr/local/lib/python3.4/site-packages/PyQt4/QtGui.so'

ldd: warning: you do not have execution permission for `/usr/local/lib/python3.4/site-packages/PyQt4/QtCore.so'

5115 INFO: Looking for eggs

5115 INFO: Python library not in binary depedencies. Doing additional searching...

Traceback (most recent call last):

File "/usr/local/bin/pyinstaller", line 9, in

load_entry_point('PyInstaller==3.2.1', 'console_scripts', 'pyinstaller')()

File "/usr/local/lib/python3.4/site-packages/PyInstaller/__main__.py", line 90, in run

run_build(pyi_config, spec_file, **vars(args))

File "/usr/local/lib/python3.4/site-packages/PyInstaller/__main__.py", line 46, in run_build

PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)

File "/usr/local/lib/python3.4/site-packages/PyInstaller/building/build_main.py", line 788, in main

build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))

File "/usr/local/lib/python3.4/site-packages/PyInstaller/building/build_main.py", line 734, in build

exec(text, spec_namespace)

File "", line 16, in

File "/usr/local/lib/python3.4/site-packages/PyInstaller/building/build_main.py", line 212, in __init__

self.__postinit__()

File "/usr/local/lib/python3.4/site-packages/PyInstaller/building/datastruct.py", line 161, in __postinit__

self.assemble()

File "/usr/local/lib/python3.4/site-packages/PyInstaller/building/build_main.py", line 543, in assemble

self._check_python_library(self.binaries)

File "/usr/local/lib/python3.4/site-packages/PyInstaller/building/build_main.py", line 626, in _check_python_library

raise IOError(msg)

OSError: Python library not found: libpython3.4m.so.1.0, libpython3.4mu.so.1.0, libpython3.4.so.1.0

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)

有人知道问题是什么吗?

就说我安装了python3 devel和python devel(与打印输出末尾的建议有关)

谢谢

Traceback (most recent call last): File "/usr/local/python3/bin/pyinstaller", line 8, in <module> sys.exit(_console_script_run()) File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/__main__.py", line 194, in _console_script_run run() File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/__main__.py", line 180, in run run_build(pyi_config, spec_file, **vars(args)) File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/__main__.py", line 61, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 1019, in main build(specfile, distpath, workpath, clean_build) File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 944, in build exec(code, spec_namespace) File "/root/test/2.spec", line 20, in <module> noarchive=False, File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 429, in __init__ self.__postinit__() File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/datastruct.py", line 184, in __postinit__ self.assemble() File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 764, in assemble self._check_python_library(self.binaries) File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 834, in _check_python_library python_lib = bindepend.get_python_library_path() File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/depend/bindepend.py", line 1018, in get_python_library_path raise IOError(msg) OSError: Python library not found: libpython3.7mu.so.1.0, libpython3.7.so.1.0, libpython3.7m.so, libpython3.7.so, libpython3.7m.so.1.0 This means your Python installation does not come with proper shared library files. This usually happens due to missing development package, or unsuitable build parameters of the Python installation. * On Debian/Ubuntu, you need to install Python development packages: * apt-get install python3-dev * apt-get install python-dev * If you are building Python by yourself, rebuild with `--enable-shared` (or, `--enable-framework` on macOS).
07-14
Traceback (most recent call last): File "/usr/local/python3/bin/pyinstaller", line 8, in <module> sys.exit(_console_script_run()) File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/__main__.py", line 194, in _console_script_run run() File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/__main__.py", line 180, in run run_build(pyi_config, spec_file, **vars(args)) File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/__main__.py", line 61, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 1019, in main build(specfile, distpath, workpath, clean_build) File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 944, in build exec(code, spec_namespace) File "/root/test/2.spec", line 20, in <module> noarchive=False, File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 429, in __init__ self.__postinit__() File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/datastruct.py", line 184, in __postinit__ self.assemble() File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 764, in assemble self._check_python_library(self.binaries) File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 834, in _check_python_library python_lib = bindepend.get_python_library_path() File "/usr/local/python3/lib/python3.7/site-packages/PyInstaller/depend/bindepend.py", line 1018, in get_python_library_path raise IOError(msg) OSError: Python library not found: libpython3.7mu.so.1.0, libpython3.7.so, libpython3.7m.so.1.0, libpython3.7m.so, libpython3.7.so.1.0 This means your Python installation does not come with proper shared library files. This usually happens due to missing development package, or unsuitable build parameters of the Python installation. * On Debian/Ubuntu, you need to install Python development packages: * apt-get install python3-dev * apt-get install python-dev * If you are building Python by yourself, rebuild with `--enable-shared` (or, `--enable-framework` on macOS).
07-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值