How to install virtualenv by using pip in MacOS Hi

2019-09-20 16:42发布

Command which i used to install virtualenv:-

sudo pip install virtualenv

Result:-

The directory '/Users/apple/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

The directory '/Users/apple/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Requirement already satisfied: virtualenv in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

2条回答
叼着烟拽天下
2楼-- · 2019-09-20 17:05

If you're trying to get rid of this error when trying to run pip just add -H flag:

sudo -H pip install foo
查看更多
狗以群分
3楼-- · 2019-09-20 17:16
sudo -H pip install virtualenv

(kodlan didn't literally mean foo...)

查看更多
登录 后发表回答