Python 2.7 未在Ubuntu中正确安装virtualenv

Python 2.7 未在Ubuntu中正确安装virtualenv,python-2.7,opencv,ubuntu-14.04,Python 2.7,Opencv,Ubuntu 14.04,我是Ubuntu 14.04的新手,我正在尝试使用“”链接安装virtualenv for python 在步骤8: enter code hevasu@vasu-HP-Pavilion-15-Notebook-PC:~$ sudo pip install virtualenv virtualenvwrapper [sudo] password for vasu: The directory '/home/vasu/.cache/pip/http' or its parent director

我是Ubuntu 14.04的新手,我正在尝试使用“”链接安装virtualenv for python 在步骤8:

enter code hevasu@vasu-HP-Pavilion-15-Notebook-PC:~$ sudo pip install virtualenv virtualenvwrapper
[sudo] password for vasu: 
The directory '/home/vasu/.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/vasu/.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.
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): stevedore in/usr/local/lib/python2.7/dist-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /usr/local/lib/python2.7/dist-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): pbr>=1.6 in /usr/local/lib/python2.7/dist-packages (from stevedore->virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): six>=1.9.0 in /usr/local/lib/python2.7/dist-packages (from stevedore->virtualenvwrapper)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarningre
为什么我有这个权限问题,因为我是唯一的用户


由于这个原因,我不得不重复整个步骤8,进入virtualenv而不是workon cv,这样我就可以使用cv2了。

除非你有很好的理由想要最新版本的virtualenv,否则你不应该首先安装它。
pip
(感知到)问题。只需执行
sudo apt获取安装virtualenvwrapper python virtualenv
即可

您可以始终使用
apt cache search SOME\u package\u NAME


至于你的实际问题:你可能是唯一一个使用你的计算机的人,但是linux操作系统总是有不止一个用户实体。使用
sudo
你可以根据用户的不同来更改以下命令的运行。对于你的pip用例,谁拥有缓存目录并不重要。而且,pip安装实际上说明你需要的一切都已经存在在您的计算机上安装ent。

执行
pip安装
而不是
sudo-pip安装