当尝试在虚拟机(Virtual Box,Windows10)上构建代码时,我得到Errno 13。
在第一次不工作后,我尝试以管理员身份运行CMD和其他一些web解决方案,但它们都没有起到任何作用。
我使用命令
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上,它会创建一个'Build‘和'dist’文件夹,并将工作应用程序放在'dist‘文件夹中。
发布于 2019-08-14 09:03:10
我最后尝试了几个不同版本的命令,"pyinstaller 'pyfile.py'“起作用了
发布于 2019-08-14 08:25:11
您是否尝试过在虚拟机中以管理员身份从CMD运行该命令?为了澄清,我的意思是右键单击run as admin,而不仅仅是在以admin帐户登录时运行CMD。
您还可以尝试使用LUA Buglight来检查pyinstaller被拒绝的确切权限。
https://stackoverflow.com/questions/57490857
复制相似问题