求助,python新手,installer打包问题...
我是直接安装Anaconda
pyinstaller是下载的包,然后直接python setup.py install
版本信息:
PyQt:PyQt5-5.12.1
Python:Python 3.5.2 :: Anaconda 4.2.0 (64-bit)
pyinstaller:3.5.dev0+14b6e6564
下面是报错
C:\CodeNew\pythonEx\excel>pyinstaller -F UnitClassification.py
573 INFO: PyInstaller: 3.5.dev0+14b6e6564
573 INFO: Python: 3.5.2
575 INFO: Platform: Windows-10-10.0.17134-SP0
583 INFO: wrote C:\CodeNew\pythonEx\excel\UnitClassification.spec
588 INFO: UPX is not available.
590 INFO: Extending PYTHONPATH with paths
['C:\\CodeNew\\pythonEx\\excel', 'C:\\CodeNew\\pythonEx\\excel']
591 INFO: checking Analysis
910 INFO: Building because C:\Users\wen\Anaconda3\lib\site-packages\PyQt5\__init__.py changed
911 INFO: Initializing module dependency graph...
918 INFO: Initializing module graph hooks...
928 INFO: Analyzing base_library.zip ...
8230 INFO: running Analysis Analysis-00.toc
9060 INFO: Caching module hooks...
9066 INFO: Analyzing C:\CodeNew\pythonEx\excel\UnitClassification.py
9247 INFO: Processing pre-find module path hook distutils
9823 INFO: Processing pre-safe import module hook six.moves
18032 INFO: Processing pre-safe import module hook setuptools.extern.six.moves
18932 INFO: Processing pre-find module path hook site
18938 INFO: site: retargeting to fake-dir 'c:\\users\\wen\\anaconda3\\lib\\site-packages\\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\\PyInstaller\\fake-modules'
18982 INFO: Processing pre-safe import module hook win32com
102468 INFO: Loading module hooks...
102469 INFO: Loading module hook "hook-PyQt5.py"...
102560 WARNING: Cannot read QLibraryInfo output: raised Expecting value: line 1 column 1 (char 0) when decoding:
Traceback (most recent call last):
File "<string>", line 11, in <module>
ImportError: DLL load failed: 找不到指定的模块。
Traceback (most recent call last):
File "C:\Users\wen\Anaconda3\Scripts\pyinstaller-script.py", line 11, in <module>
load_entry_point('PyInstaller==3.5.dev0+14b6e6564', 'console_scripts', 'pyinstaller')()
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\build_main.py", line 844, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\build_main.py", line 791, in build
exec(code, spec_namespace)
File "C:\CodeNew\pythonEx\excel\UnitClassification.spec", line 17, in <module>
noarchive=False)
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\build_main.py", line 243, in __init__
self.__postinit__()
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\datastruct.py", line 158, in __postinit__
self.assemble()
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\build_main.py", line 502, in assemble
module_hook.post_graph()
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\imphook.py", line 410, in post_graph
self._load_hook_module()
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\imphook.py", line 377, in _load_hook_module
self.hook_module_name, self.hook_filename)
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\compat.py", line 785, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 388, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 809, in load_module
File "<frozen importlib._bootstrap_external>", line 668, in load_module
File "<frozen importlib._bootstrap>", line 268, in _load_module_shim
File "<frozen importlib._bootstrap>", line 693, in _load
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\hooks\hook-PyQt5.py", line 23, in <module>
collect_system_data_files(pyqt5_library_info.location['PrefixPath'],
File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\utils\hooks\qt.py", line 70, in __getattr__
qli = json.loads(json_str)
File "C:\Users\wen\Anaconda3\lib\json\__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "C:\Users\wen\Anaconda3\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\wen\Anaconda3\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)