首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >虚拟环境安装错误

虚拟环境安装错误
EN

Stack Overflow用户
提问于 2017-10-31 16:09:05
回答 1查看 40关注 0票数 0

当我试图在我的本地系统中安装一个虚拟环境时,我得到了这个错误。你能帮我解决这个问题吗?

代码语言:javascript
复制
$ pip -V
pip 9.0.1 from /home/sysadmin/.local/lib/python2.7/site-packages (python 2.7)

$ sudo pip install virutalenv
sudo: unable to resolve host sysadmin-Veriton-M200-H61
The directory '/home/sysadmin/.cache/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 '/home/sysadmin/.cache/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.
Collecting virutalenv
  Could not find a version that satisfies the requirement virutalenv (from versions: )
No matching distribution found for virutalenv
EN

回答 1

Stack Overflow用户

发布于 2017-10-31 16:18:30

你有一个打字错误。是virtualenv,不是virutalenv

另外,由于您已经在.local中安装了pip,因此请不要使用sudo安装virtualenv

只是

代码语言:javascript
复制
$ pip install --user virtualenv

应该这样做,virtualenv将在您的用户目录中可用(~/.local/bin如果内存允许,但find ~ -type f -name virtualenv会为您找到它)。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47030591

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档