M HYPE SPLASH
// updates

no module named packaging.version

By John Peck

I installed Ubuntu 14.04 yesterday and installed pip by the command
sudo apt-get install python-pip,
later when I am trying to install other packages through pip or trying to check the pip version, I am getting the following error.

Traceback (most recent call last): File "/usr/bin/pip", line 5, in module from pkg_resources import load_entry_point File "/home/abhi/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 70, in module import packaging.version
ImportError: No module named packaging.version

I tried by installing pip3, but that also gives the same error.

1

2 Answers

I solved the above problem by installing pip by the following command

python -m pip install -U pip

Now pip is working fine..

2

What worked for me was to reinstall pip using the get-pip.py script, as described here:

sudo apt-get purge python-pip python-setuptools
curl -O
sudo python get-pip.py

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy