How to fix pip under Debian 6.0 (squeeze): ImportError: cannot import name parser

HowTo, Linux, Programmazione, Python, Ubuntu (EN) Add comments

The pip utility distributed with Debian 6.0 has a bug once you upgrade it with pip install -U pip. You will easily get this error when you try to install a new package with it:

root@worker2:~# pip install setproctitle
Traceback (most recent call last):
File "/usr/bin/pip", line 8, in <module>
from pip.baseparser import parser
ImportError: cannot import name parser

Luckly there is a very easy workaround:

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


4 Responses to “How to fix pip under Debian 6.0 (squeeze): ImportError: cannot import name parser”

  1. Henry Says:

    Took me a sec. Last time I used something named “pip” on the command line, I was working in CP/M. Good ol’ (p)eripheral (i)nterface (p)rogram. Used it to copy files.

  2. Christoph Says:

    Thanks, saved my day!

  3. Ryan Says:

    Thank yuo so much.. I followed the advice here: but that still led to the error above. Did what you said and everything works perfectly now!

  4. Jacob's Blog » Adventures with HTPC Manager Says:

    […] maybe that was a bit too simple. A quick Google brings up the site of Andrea Grandi, who was having the same issue after self-updating PIP. He quite helpfully includes a translation […]

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in

Switch to our mobile site