首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >cx-freeze PermissionError:[Errno 13]权限被拒绝

cx-freeze PermissionError:[Errno 13]权限被拒绝
EN

Stack Overflow用户
提问于 2020-04-08 21:09:40
回答 3查看 1.2K关注 0票数 3

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

代码语言:javascript
复制
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_'。我找不到任何其他网站来解释如何解决这个问题。为什么会出现这个错误?能帮我一下吗..。

EN

Stack Overflow用户

发布于 2020-06-12 06:41:40

伙计,你正在从system32运行命令

使用此命令cd到另一个目录,然后重试

代码语言:javascript
复制
cd C:/Users/<your name>/Documents

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

票数 3
EN
查看全部 3 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61101482

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档