virtualenv-有人可以纠正这个问题吗?

virtualenv-有人可以纠正这个问题吗?

该图像是我在 ubuntu 中执行此命令时收到的错误的屏幕截图-

$ sudo pip install virtualenv

The directory '/home/asha/.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/asha/.cache/pip/http' or its parent directory is not owned by the current user and caching wheels has been disabled. check permission and owner of that directory. if executing pip with sudo, you may want sudo's -H flag. 
Requirement already satisfied: virtualenv in ./.local/lib/python2.7/site-packages""

截屏

答案1

我没有分数来写评论。所以在这里回答。

通常安装时sudo xxx yyyyy没有带足够的权限来更改目录和文件。

一个好的解决方法是打开终端,以 root 身份登录并安装:

$ sudo -i
password for rootname:
$ pip install virtualenv

现在,安装程序拥有完全权限

相关内容