当我尝试使用pyinstaller将我的.py文件转换为一个应用程序时,我在终端上得到以下输出
Rishabhs-MacBook-Pro:desktop rishabhtatia$ pyinstaller --clean --hidden-
import tkinter test.py
697 INFO: PyInstaller: 3.3.1
697 INFO: Python: 3.6.4
709 INFO: Platform: Darwin-17.4.0-x86_64-i386-64bit
711 INFO: wrote /Users/rishabhtatia/Desktop/test.spec
714 INFO: UPX is not available.
716 INFO: Removing temporary files and cleaning cache in /Users/rishabhtatia/Library/Application Support/pyinstaller
Traceback (most recent call last):
File "/Users/rishabhtatia/anaconda3/bin/pyinstaller", line 11, in <module>
sys.exit(run())
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/__main__.py", line 94, in run
run_build(pyi_config, spec_file, **vars(args))
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 791, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 737, in build
exec(text, spec_namespace)
File "<string>", line 16, in <module>
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 162, in __init__
raise ValueError("script '%s' not found" % script)
ValueError: script '/Users/rishabhtatia/Desktop/test.py' not found
Rishabhs-MacBook-Pro:desktop rishabhtatia$ pyinstaller --clean --hidden-import tkinter typeMachine.py
314 INFO: PyInstaller: 3.3.1
314 INFO: Python: 3.6.4
321 INFO: Platform: Darwin-17.4.0-x86_64-i386-64bit
323 INFO: wrote /Users/rishabhtatia/Desktop/typeMachine.spec
326 INFO: UPX is not available.
327 INFO: Removing temporary files and cleaning cache in /Users/rishabhtatia/Library/Application Support/pyinstaller
328 INFO: Extending PYTHONPATH with paths
['/Users/rishabhtatia/Desktop', '/Users/rishabhtatia/Desktop']
328 INFO: checking Analysis
328 INFO: Building Analysis because out00-Analysis.toc is non existent
328 INFO: Initializing module dependency graph...
332 INFO: Initializing module graph hooks...
334 INFO: Analyzing base_library.zip ...
4406 INFO: Analyzing hidden import 'tkinter'
4576 INFO: running Analysis out00-Analysis.toc
4586 INFO: Caching module hooks...
4590 INFO: Analyzing /Users/rishabhtatia/Desktop/typeMachine.py
4827 INFO: Processing pre-safe import module hook six.moves
5525 INFO: Processing pre-find module path hook distutils
10217 INFO: Processing pre-find module path hook site
10218 INFO: site: retargeting to fake-dir '/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/fake-modules'
16738 INFO: Loading module hooks...
16738 INFO: Loading module hook "hook-pkg_resources.py"...
17122 INFO: Processing pre-safe import module hook win32com
17433 INFO: Loading module hook "hook-PyQt5.py"...
17628 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
17630 INFO: Loading module hook "hook-lib2to3.py"...
17633 INFO: Loading module hook "hook-_tkinter.py"...
17877 INFO: checking Tree
17877 INFO: Building Tree because out00-Tree.toc is non existent
17877 INFO: Building Tree out00-Tree.toc
17888 INFO: checking Tree
17888 INFO: Building Tree because out01-Tree.toc is non existent
17889 INFO: Building Tree out01-Tree.toc
17895 INFO: Loading module hook "hook-encodings.py"...
17973 INFO: Loading module hook "hook-PIL.py"...
17979 INFO: Excluding import 'PyQt4'
17981 INFO: Removing import of PyQt4 from module PIL.ImageQt
17981 INFO: Excluding import 'PySide'
17983 INFO: Removing import of PySide from module PIL.ImageQt
17983 INFO: Excluding import 'tkinter'
17985 INFO: Import to be excluded not found: 'FixTk'
17985 INFO: Excluding import 'PyQt5'
17987 INFO: Removing import of PyQt5.QtCore from module PIL.ImageQt
17987 INFO: Removing import of PyQt5.QtGui from module PIL.ImageQt
17987 INFO: Loading module hook "hook-setuptools.py"...
18020 INFO: Loading module hook "hook-pycparser.py"...
18279 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
18847 INFO: Loading module hook "hook-PIL.Image.py"...
19267 INFO: Loading module hook "hook-PyQt5.Qt.py"...
19269 INFO: Loading module hook "hook-pytest.py"...
20348 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
20349 INFO: Loading module hook "hook-sysconfig.py"...
Traceback (most recent call last):
File "/Users/rishabhtatia/anaconda3/bin/pyinstaller", line 11, in <module>
sys.exit(run())
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/__main__.py", line 94, in run
run_build(pyi_config, spec_file, **vars(args))
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 791, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 737, in build
exec(text, spec_namespace)
File "<string>", line 16, in <module>
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 213, in __init__
self.__postinit__()
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/building/datastruct.py", line 161, in __postinit__
self.assemble()
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 472, in assemble
module_hook.post_graph()
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/building/imphook.py", line 410, in post_graph
self._load_hook_module()
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/building/imphook.py", line 377, in _load_hook_module
self.hook_module_name, self.hook_filename)
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/compat.py", line 744, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 399, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 823, in load_module
File "<frozen importlib._bootstrap_external>", line 682, in load_module
File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/rishabhtatia/anaconda3/lib/python3.6/site-packages/PyInstaller/hooks/hook-sysconfig.py", line 42, in <module>
hiddenimports = [sysconfig._get_sysconfigdata_name()]
TypeError: _get_sysconfigdata_name() missing 1 required positional argument: 'check_exists'
我尝试过在pyinstaller中使用各种不同的命令,但是没有成功。在
我当前正在使用 python版本:3.6.4 anaconda版本:1.6.9 马海斯山脉
任何帮助我如何成功地将这个python文件转换成一个应用程序将不胜感激!谢谢您!在
我也遇到了同样的问题。经过进一步调查,似乎是水蟒引入突破性变化的问题。在
有关详细讨论,请参见https://github.com/pyinstaller/pyinstaller/issues/3192。在
相关问题 更多 >
编程相关推荐