How to install virtualenv by using pip in MacOS High Sierra?

核能气质少年 提交于 2019-12-14 03:33:55

问题


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

回答1:


sudo -H pip install virtualenv

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




回答2:


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

sudo -H pip install foo


来源:https://stackoverflow.com/questions/46552127/how-to-install-virtualenv-by-using-pip-in-macos-high-sierra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!