gpt4 book ai didi

python - cx-卡住权限错误 : [Errno 13] Permission denied

转载 作者:行者123 更新时间:2023-12-04 02:37:20 26 4
gpt4 key购买 nike

我正在尝试使用 cx_Freeze 作为将 .py 转换为 .exe ( auto-py-to-exe) 的常用应用程序的替代方法。当我在 cmd 中运行它时,我得到:

C:\WINDOWS\system32>cxfreeze-quickstart
Project name: FE
Version [1.0]: 1.0
Description: File Edit and more!!!
Python file to make executable from: File Create.py
Executable file name [File Create]: FileCreateExe
(C)onsole application, (G)UI application, or (S)ervice [C]: C
Save setup script to [setup.py]: C:\Users\tom\Documents\python\_Thiswill createfiles_
Overwrite C:\Users\tom\Documents\python\_Thiswillcreatefiles_ [n]? yes
Traceback (most recent call last):
File "c:\users\tom\appdata\local\programs\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\tom\appdata\local\programs\python\python38-32\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\tom\AppData\Local\Programs\Python\Python38-32\scripts\cxfreeze-quickstart.exe\__main__.py", line 7, in <module>
File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\cx_Freeze\setupwriter.py", line 101, in main
writer.Write()
File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\cx_Freeze\setupwriter.py", line 64, in Write
output = open(self.setupFileName, "w")
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\tom\\Documents\\python\\_This will create files_'

如您所见,我以管理员身份运行命令提示符,因为我在正常运行时遇到了同样的错误。我该怎么做才能修复此错误? PermissionError: [Errno 13] Permission denied: 'C:\\Users\\tom\\Documents\\python\\_This will create files_'。我找不到任何其他网站来解释如何解决这个问题。为什么会出现这个错误?请问我能帮忙吗……😁😁😁

最佳答案

老兄,你正在从 system32 运行命令

用这个命令cd到另一个目录再试一次

cd C:/Users/<your name>/Documents

如果这不起作用,请转到 here

关于python - cx-卡住权限错误 : [Errno 13] Permission denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61101482/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com