美文网首页
Mac上,安装虚拟环境 virtualenv 报黄色警告 并且无

Mac上,安装虚拟环境 virtualenv 报黄色警告 并且无

作者: 土986885 | 来源:发表于2019-12-06 09:15 被阅读0次

今天在学习到18章时,遇到一个问题,一直无法创建虚拟环境

安装虚拟环境 使用命令

sudo pip install virtualenv

然后使用 virtualenv --version 提示错误

错误如下:

WARNING: The directory '/Users//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.

WARNING: The directory '/Users/xxx/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.

解决办法:

sudo -H pip install virtualenv

执行完毕后可以正常查看版本号

相关文章

网友评论

      本文标题:Mac上,安装虚拟环境 virtualenv 报黄色警告 并且无

      本文链接:https://www.haomeiwen.com/subject/vresgctx.html