赞
踩
好的,我正在尝试将一个小的python脚本制作成一个exe文件,我正在使用pyinstaller。(我的命令是
pyinstaller.exe --windowed --icon=pics\icon.ico -F --onefile main.py
)我已经了解了如何使用pyinstaller,它在我制作这个python程序的早期版本之前就已经工作过了。现在不行了,我不知道为什么。它的意思是,它试图创建的文件已经存在,但它没有(我已经检查过),它给了我这个错误:
765 INFO: PyInstaller: 3.4
765 INFO: Python: 3.7.1
765 INFO: Platform: Windows-10-10.0.17134-SP0
Traceback (most recent call last):
File "C:\Users\username\AppData\Local\Programs\Python\Python37\Scripts\pyinstaller-script.py", line 11, in
load_entry_point('pyinstaller==3.4', 'console_scripts', 'pyinstaller')()
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\pyinstaller-3.4-py3.7.egg\PyInstaller\__main__.py", line 109, in run
spec_file = run_makespec(**vars(args))
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\pyinstaller-3.4-py3.7.egg\PyInstaller\__main__.py", line 56, in run_makespec
spec_file = PyInstaller.building.makespec.main(filenames, **opts)
File "c:\users\username\appdata\local\programs\python\python37\lib\site-packages\pyinstaller-3.4-py3.7.egg\PyInstaller\building\makespec.py", line 331, in main
os.makedirs(specpath)
File "c:\users\username\appdata\local\programs\python\python37\lib\os.py", line 221, in makedirs
mkdir(name, mode)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\username\\OneDrive\\Documents\\Game Center'
(以前做过,但那次,我试图制作的文件已经存在了。我删除了文件,再试了一次,一切正常。)
感谢您的帮助。谢谢!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。