When I tried installing Flask I got this error:
ImportError: No module named packaging.version
6 Answers 6
To fix this, I had to do:
pip install setuptools
1 Comment
If your Python runs on Ubuntu, try to do this:
cd /usr/local/lib/python2.7/dist-packages
mv pkg_resources/ pkg_resources_bak/
I'm not sure what package installed the "pkg_resources", it will make pip always show error.
Comments
Try this
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
2 Comments
As an Ubuntu 14.04 user, upgrading pip to version 9.0.1 fixed this problem for me.
Upgrading pip normally
- Download get-pip.py script
- Run:
python get-pip.py
Upgrading/installing pip behind a corporate firewall
- Download get-pip.py script, along with pip, wheel, and setuptools from pypi
- Place all files in the
/tmpdirectory - Run the following command to install pip:
sudo -H python /tmp/get-pip.py --no-index --find-links=/tmp pip
Comments
In case anyone stumbles upon this problem, my solution was to change the packaging version from 22.0 to 21.3.
2 Comments
i also have the problem when i install kats module, after try install a older packaging, such as "pip install packaging==21.0", i sovled my problem. hope helpfull.