Failed to install Virtualenv with peak for Debian compression

As root, I am trying to configure a dev server running Debian Squeeze using the virtualenv directory.

My plan was to execute the following commands:

apt-get install python-pip pip install pip --upgrade pip install virtualenv 

In the last command, however, I got the following error and now I get it whenever I run pip:

 Traceback (most recent call last): File "/usr/bin/pip", line 11, in <module> from pip.vcs import vcs, get_src_requirement, import_vcs_support ImportError: cannot import name import_vcs_support 

Google has little to offer on this. Subsequently, python-dev and build-essential installed, but the problem persists.

+6
source share
2 answers

It seems that something was screwing up when the pip was updated itself.

I worked on the problem by reinstalling pip with easy_install:

 easy_install pip 

And then a link to this version:

 ln -sv /usr/local/bin/pip-2.6 /usr/bin/pip 

(EDIT)

Here's the complete sequence from scratch:

 apt-get install python-pip python-dev build-essential pip install pip --upgrade pip install virtualenv 

An import error occurred here. To restore, follow these steps:

 easy_install pip rm /usr/bin/pip ln -sv /usr/local/bin/pip-2.6 /usr/bin/pip pip install pip --upgrade pip install virtualenv 

You can avoid this by simply using easy_install from the beginning, but at the moment I do not have a clean Debian installation to confirm this.

+19
source

This may not be the complete answer, but I find the code in the comments very difficult to read.

I managed to install pip on Debian 7.3 amd64 without errors using

 user@host :~$ sudo aptitude install python-pip ... user@host :~$ pip install virtualenv ... 

As I skipped self-updating, this obviously does not give me pip in the current latest version 1.5.2 ; virtualenv has been updated (1.11.2) , though:

 user@host :~$ pip --version pip 1.1 from /usr/lib/python2.7/dist-packages (python 2.7) user@host :~$ virtualenv --version 1.11.2 
+1
source

Source: https://habr.com/ru/post/910620/


All Articles