Getting "PermissionError: [Errno13] Permission denied: 'C:\\Users\\BobTheBuilder\\Desktop\\build\\build"
Getting "PermissionError: [Errno13] Permission denied: 'C:\\Users\\BobTheBuilder\\Desktop\\build\\build"
尝试在虚拟机(Virtual Box,Windows 10)上构建我的代码时,出现错误号 13。
在第一次没有工作后,我尝试了 运行 CMD 作为管理员和网络上的其他一些解决方案,其中 none 有任何不同。
我用命令
pyinstaller build DankConvoGenv2.1.2.py
它产生
202 INFO: PyInstaller: 3.5
202 INFO: Python: 3.7.4
202 INFO: Platform: Windows-10-10.0.18362-SP0
218 INFO: wrote C:\Users\BobTheBuilder\Desktop\build\build.spec
218 INFO: UPX is not available.
218 INFO: Extending PYTHONPATH with paths
['C:\Users\BobTheBuilder\Desktop\build',
'C:\Users\BobTheBuilder\Desktop\build',
'C:\Users\BobTheBuilder\Desktop\build']
218 INFO: checking Analysis
218 INFO: Building Analysis because Analysis-00.toc is non existent
218 INFO: Initializing module dependency graph...
218 INFO: Initializing module graph hooks...
233 INFO: Analyzing base_library.zip ...
5546 INFO: running Analysis Analysis-00.toc
5546 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\bobthebuilder\appdata\local\programs\python\python37\python.exe
6061 INFO: Caching module hooks...
6061 INFO: Analyzing C:\Users\BobTheBuilder\Desktop\build\build
Traceback (most recent call last):
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\BobTheBuilder\AppData\Local\Programs\Python\Python37\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\building\build_main.py", line 844, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build
exec(code, spec_namespace)
File "C:\Users\BobTheBuilder\Desktop\build\build.spec", line 17, in <module>
noarchive=False)
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\building\build_main.py", line 243, in __init__
self.__postinit__()
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
self.assemble()
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\building\build_main.py", line 445, in assemble
priority_scripts.append(self.graph.run_script(script))
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\depend\analysis.py", line 201, in run_script
self._top_script_node = super(PyiModuleGraph, self).run_script(pathname)
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1384, in run_script
with open(pathname, 'rb') as fp:
PermissionError: [Errno 13] Permission denied: 'C:\Users\BobTheBuilder\Desktop\build\build'
通常在我的物理 windows PC 上,它会在 'dist' 文件夹中创建一个 'Build' 和 'dist' 文件夹,其中包含工作应用程序。
您是否尝试过 运行在您的虚拟机中以管理员身份从 CMD 运行 执行命令?澄清一下,我的意思是右键单击 运行 作为管理员,而不是仅 运行 在以管理员帐户登录时使用 CMD。
您也可以尝试使用 LUA Buglight 来准确检查 pyinstaller 被拒绝的权限。
我最终尝试了几个不同版本的命令并且 "pyinstaller 'pyfile.py'" 成功了
尝试在虚拟机(Virtual Box,Windows 10)上构建我的代码时,出现错误号 13。
在第一次没有工作后,我尝试了 运行 CMD 作为管理员和网络上的其他一些解决方案,其中 none 有任何不同。
我用命令
pyinstaller build DankConvoGenv2.1.2.py
它产生
202 INFO: PyInstaller: 3.5
202 INFO: Python: 3.7.4
202 INFO: Platform: Windows-10-10.0.18362-SP0
218 INFO: wrote C:\Users\BobTheBuilder\Desktop\build\build.spec
218 INFO: UPX is not available.
218 INFO: Extending PYTHONPATH with paths
['C:\Users\BobTheBuilder\Desktop\build',
'C:\Users\BobTheBuilder\Desktop\build',
'C:\Users\BobTheBuilder\Desktop\build']
218 INFO: checking Analysis
218 INFO: Building Analysis because Analysis-00.toc is non existent
218 INFO: Initializing module dependency graph...
218 INFO: Initializing module graph hooks...
233 INFO: Analyzing base_library.zip ...
5546 INFO: running Analysis Analysis-00.toc
5546 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\bobthebuilder\appdata\local\programs\python\python37\python.exe
6061 INFO: Caching module hooks...
6061 INFO: Analyzing C:\Users\BobTheBuilder\Desktop\build\build
Traceback (most recent call last):
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\BobTheBuilder\AppData\Local\Programs\Python\Python37\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\building\build_main.py", line 844, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build
exec(code, spec_namespace)
File "C:\Users\BobTheBuilder\Desktop\build\build.spec", line 17, in <module>
noarchive=False)
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\building\build_main.py", line 243, in __init__
self.__postinit__()
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
self.assemble()
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\building\build_main.py", line 445, in assemble
priority_scripts.append(self.graph.run_script(script))
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\depend\analysis.py", line 201, in run_script
self._top_script_node = super(PyiModuleGraph, self).run_script(pathname)
File "c:\users\bobthebuilder\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1384, in run_script
with open(pathname, 'rb') as fp:
PermissionError: [Errno 13] Permission denied: 'C:\Users\BobTheBuilder\Desktop\build\build'
通常在我的物理 windows PC 上,它会在 'dist' 文件夹中创建一个 'Build' 和 'dist' 文件夹,其中包含工作应用程序。
您是否尝试过 运行在您的虚拟机中以管理员身份从 CMD 运行 执行命令?澄清一下,我的意思是右键单击 运行 作为管理员,而不是仅 运行 在以管理员帐户登录时使用 CMD。
您也可以尝试使用 LUA Buglight 来准确检查 pyinstaller 被拒绝的权限。
我最终尝试了几个不同版本的命令并且 "pyinstaller 'pyfile.py'" 成功了