我尝试使用pyinstaller从python3文件创建python二进制文件,但是它失败并且错误消息如下所示,任何人都可以给我一些建议吗?感谢。
user@user:~ /Pyinstaller3/pyinstaller-python3$ **python3.4 pyinstaller.py -F /home/austinlin/programTest/translate0918_1.py**
67 INFO: PyInstaller: 3.0.dev
67 INFO: Python: 3.4.3
67 INFO: Platform: Linux-3.2.0-90-generic-pae-i686-with-Ubuntu-12.04-precise
67 INFO: wrote /home/austinlin/tools/Pyinstaller3/pyinstaller-python3/translate0918_1/translate0918_1.spec
68 INFO: UPX is not available.
69 INFO: Extending PYTHONPATH with /home/austinlin/programTest
69 INFO: checking Analysis
76 INFO: checking PYZ
79 INFO: checking PKG
79 INFO: Building because toc changed
80 INFO: Building PKG (CArchive) out00-PKG.pkg
Traceback (most recent call last):
File "pyinstaller.py", line 18, in <module>
run()
File "/home/austinlin/tools/Pyinstaller3/pyinstaller-python3/PyInstaller/__main__.py", line 99, in run
run_build(opts, spec_file, pyi_config)
File "/home/austinlin/tools/Pyinstaller3/pyinstaller-python3/PyInstaller/__main__.py", line 47, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **opts.__dict__)
File "/home/austinlin/tools/Pyinstaller3/pyinstaller-python3/PyInstaller/building/build_main.py", line 734, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/home/austinlin/tools/Pyinstaller3/pyinstaller-python3/PyInstaller/building/build_main.py", line 677, in build
exec(text, spec_namespace)
File "<string>", line 28, in <module>
File "/home/austinlin/tools/Pyinstaller3/pyinstaller-python3/PyInstaller/building/api.py", line 421, in __init__
strip_binaries=self.strip, upx_binaries=self.upx,
File "/home/austinlin/tools/Pyinstaller3/pyinstaller-python3/PyInstaller/building/api.py", line 232, in __init__
self.__postinit__()
File "/home/austinlin/tools/Pyinstaller3/pyinstaller-python3/PyInstaller/building/datastruct.py", line 153, in __postinit__
self.assemble()
File "/home/austinlin/tools/Pyinstaller3/pyinstaller-python3/PyInstaller/building/api.py", line 300, in assemble
pylib_name = os.path.basename(bindepend.get_python_library_path())
File "/usr/lib/python3.4/posixpath.py", line 139, in basename
i = p.rfind(sep) + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
但如果我使用python python2.7 pyinstaller.py -F python2file.py,它可以正常工作