No Module Named Packaging. Version
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...
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.
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..
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