当我尝试执行“pip安装pyinstaller”时,我得到了这个错误(python39)
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kaito\\AppData\\Local\\Temp\\pip-install-x1uajlp_\\pefile\\setup.py'"'"'; __file__='"'"'C:\\Users\\kaito\\AppData\\Local\\Temp\\pip-install-x1uajlp_\\pefile\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\kaito\AppData\Local\Temp\pip-record-i794i3gc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\pefile'
cwd: C:\Users\kaito\AppData\Local\Temp\pip-install-x1uajlp_\pefile\
Complete output (14 lines):
running install
running build
running build_py
creating build
creating build\lib
copying pefile.py -> build\lib
copying peutils.py -> build\lib
creating build\lib\ordlookup
copying ordlookup\oleaut32.py -> build\lib\ordlookup
copying ordlookup\ws2_32.py -> build\lib\ordlookup
copying ordlookup\__init__.py -> build\lib\ordlookup
running install_lib
byte-compiling c:\python39\Lib\site-packages\pefile.py to pefile.cpython-39.pyc
error: [Errno 13] Permission denied: 'c:\\python39\\Lib\\site-packages\\__pycache__\\pefile.cpython-39.pyc.2747580017328'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kaito\\AppData\\Local\\Temp\\pip-install-x1uajlp_\\pefile\\setup.py'"'"'; __file__='"'"'C:\\Users\\kaito\\AppData\\Local\\Temp\\pip-install-x1uajlp_\\pefile\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\kaito\AppData\Local\Temp\pip-record-i794i3gc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\pefile' Check the logs for full command output.
我似乎无法解决此问题,请帮助
以管理员身份运行cmd。在UAC窗口中选择是
您的错误是:
这可能是因为您不是计算机上的管理员用户。 您可以切换到管理员帐户,也可以作为管理员运行终端/命令提示符 (右键单击命令提示符,选择“以管理员身份运行”)
好的,错误很明显,您无权访问您试图安装pip包的文件夹
使用命令
pip install user pyinstaller
如果这不起作用:
创建virtualenv并在其中安装软件包:
cd
转到项目文件夹virtualenv venv
创建虚拟环境\venv\Scripts\activate.bat
激活虚拟环境pip install pyinstaller
将包安装在那里您可能还希望通过右键单击下面路径中的文件夹来检查文件权限
还有一个related post您可能需要检查。它可以让你知道什么是错的
相关问题 更多 >
编程相关推荐