安装 pip 安装'python-decouple'时出错


Collecting python-decouple
Using cached python-decouple-3.3.tar.gz (10 kB)
Using legacy setup.py install for python-decouple, since package 'wheel' is not installed.
Installing collected packages: python-decouple
Running setup.py install for python-decouple ... error
ERROR: Command errored out with exit status 1:
command: 'c:python38python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\slms_\AppData\Local\Temp\pip-install-awe0dvrf\python-decouple\setup.py'"'"'; __file__='"'"'C:\Users\slms_\AppData\Local\Temp\pip-install-awe0dvrf\python-decouple\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Usersslms_AppDataLocalTemppip-record-aljfw6bcinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:python38Includepython-decouple'      
cwd: C:Usersslms_AppDataLocalTemppip-install-awe0dvrfpython-decouple
Complete output (16 lines):
running install
running build
running build_py
creating build
creating buildlib
copying decouple.py -> buildlib
running egg_info
writing python_decouple.egg-infoPKG-INFO
writing dependency_links to python_decouple.egg-infodependency_links.txt
writing top-level names to python_decouple.egg-infotop_level.txt
reading manifest file 'python_decouple.egg-infoSOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'python_decouple.egg-infoSOURCES.txt'
running install_lib
byte-compiling c:python38Libsite-packagesdecouple.py to decouple.cpython-38.pyc
error: [Errno 13] Permission denied: 'c:\python38\Lib\site-packages\__pycache__\decouple.cpython-38.pyc.2802584858032'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:python38python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\slms_\AppData\Local\Temp\pip-install-awe0dvrf\python-decouple\setup.py'"'"'; __file__='"'"'C:\Users\slms_\AppData\Local\Temp\pip-install-awe0dvrf\python-decouple\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Usersslms_AppDataLocalTemppip-record-aljfw6bcinstall-rec

您显然缺乏进行安装的权限。您可以使用venv或以管理员身份运行cmd(idk我不使用windows(

要设置venv,请在启动cmd 时在项目目录中运行以下命令

C:> python3 -m venv ./.venv 

然后运行安装脚本

相关内容

  • 没有找到相关文章

最新更新