【发布时间】:2020-07-15 22:31:55
【问题描述】:
尝试在 pipenv shell 中安装 python-decouple:
(projectname) username@host: pipenv install python-decouple
但我收到以下错误:
Installing python-decouple…
Error: An error occurred while installing python-decouple!
Error text: Processing /home/username/.cache/pipenv/wheels/6d/5a/2d/acfg...422fd/python_decouple-3.3-py3-none-any.whl
Installing collected packages: python-decouple
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/home/username/.local/share/virtualenvs/projectname-J2Y6DseW/lib/python3.6/site-packages/__pycache__/decouple.cpython-36.pyc'
Consider using the `--user` option or check the permissions.
我意识到我可以使用以下命令从 pipenv shell 外部安装这个包:
python3 -m pip install --user python-decouple
但这意味着当有人尝试使用 Pipenv 复制我的项目环境时,此依赖项将不会由 Pipenv 管理...
我该如何解决这个问题,它的原因是什么,我可以在文件上设置什么样的权限来解决它?
【问题讨论】:
标签: python python-3.x dependency-management pipenv virtual-environment