我一直在尝试生成我编写的程序的.exe。我在PyCharm工作,从那里运行Pyinstaller通常没有问题。但是,我的PC是昨晚更新的,并且自从拒绝运行以来。
我尝试过:
以下是PyCharm终端引发的错误的示例:
(venv) C:\Users\****\PycharmProjects\WorkProjects\02_DVR_Listings>pyinstaller --onefile DVR_Listings_00_02.py
106 INFO: PyInstaller: 3.6
106 INFO: Python: 3.7.4
107 INFO: Platform: Windows-10-10.0.18362-SP0
109 INFO: wrote C:\Users\jkrha\PycharmProjects\WorkProjects\02_DVR_Listings\DVR_Listings_00_02.spec
112 INFO: UPX is not available.
113 INFO: Extending PYTHONPATH with paths
['C:\\Users\\jkrha\\PycharmProjects\\WorkProjects\\02_DVR_Listings',
'C:\\Users\\jkrha\\PycharmProjects\\WorkProjects\\02_DVR_Listings']
113 INFO: checking Analysis
129 INFO: checking PYZ
336 INFO: checking PKG
338 INFO: Building because toc changed
338 INFO: Building PKG (CArchive) PKG-00.pkg
Traceback (most recent call last):
File "C:\Users\jkrha\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\jkrha\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\jkrha\PycharmProjects\WorkProjects\venv\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
File "c:\users\jkrha\pycharmprojects\workprojects\venv\lib\site-packages\PyInstaller\__main__.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\jkrha\pycharmprojects\workprojects\venv\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\jkrha\pycharmprojects\workprojects\venv\lib\site-packages\PyInstaller\building\build_main.py", line 734, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\users\jkrha\pycharmprojects\workprojects\venv\lib\site-packages\PyInstaller\building\build_main.py", line 681, in build
exec(code, spec_namespace)
File "C:\Users\jkrha\PycharmProjects\WorkProjects\02_DVR_Listings\DVR_Listings_00_02.spec", line 33, in <module>
console=True )
File "c:\users\jkrha\pycharmprojects\workprojects\venv\lib\site-packages\PyInstaller\building\api.py", line 436, in __init__
upx_exclude=self.upx_exclude
File "c:\users\jkrha\pycharmprojects\workprojects\venv\lib\site-packages\PyInstaller\building\api.py", line 199, in __init__
self.__postinit__()
File "c:\users\jkrha\pycharmprojects\workprojects\venv\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
self.assemble()
File "c:\users\jkrha\pycharmprojects\workprojects\venv\lib\site-packages\PyInstaller\building\api.py", line 262, in assemble
dist_nm=inm)
File "c:\users\jkrha\pycharmprojects\workprojects\venv\lib\site-packages\PyInstaller\building\utils.py", line 220, in checkCache
digest = cacheDigest(fnm, redirects)
File "c:\users\jkrha\pycharmprojects\workprojects\venv\lib\site-packages\PyInstaller\building\utils.py", line 365, in cacheDigest
with open(fnm, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: ''
我认为PC升级会在某些地方弄乱某些设置,但我无法解决。但是,我确实必须重新分配项目解释器,因为它声称升级后该解释器无效
任何帮助将不胜感激!