无法在virtualen下安装Django

2024-10-01 09:42:08 发布

您现在位置:Python中文网/ 问答频道 /正文

  1. 当我键入命令:“pip install django”时,显示错误消息: 错误:
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied
  1. 当我尝试命令:“pip install django--user”时,显示错误消息: 错误:
Can not perform a '--user' install. User site-packages are not visible in this virtualenv. 

我想在我的Mac上安装virtualenv下的Django,但是正如总结所示,我的许可被拒绝了,我确定我是root用户。你知道吗

(newVENV10112019) braveru@BraveRudeMacBook-Air bin % pip install django           
Collecting django
  Using cached https://files.pythonhosted.org/packages/b2/79/df0ffea7bf1e02c073c2633702c90f4384645c40a1dd09a308e02ef0c817/Django-2.2.6-py3-none-any.whl
Collecting pytz (from django)
  Using cached https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl
Collecting sqlparse (from django)
  Using cached https://files.pythonhosted.org/packages/ef/53/900f7d2a54557c6a37886585a91336520e5539e3ae2423ff1102daf4f3a7/sqlparse-0.3.0-py2.py3-none-any.whl
Installing collected packages: pytz, sqlparse, django
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Users/braveru/CodingNow/VENV/newVENV10112019/lib/python3.7/site-packages/pytz'
Consider using the `--user` option or check the permissions.


-----------

(newVENV10112019) braveru@BraveRudeMacBook-Air bin % pip3 install django --user
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.

我尝试了所有的方式,从谷歌搜索,我也重新安装我的MacOS, 同样的事情也会发生。你知道吗


Tags: installpipdjangovirtualenvpackages错误sitenot