When I tried installing Flask I got this error:
ImportError: No module named packaging.version
When I tried installing Flask I got this error:
ImportError: No module named packaging.version
To fix this, I had to do:
pip install setuptools
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.
Try this
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
As an Ubuntu 14.04 user, upgrading pip to version 9.0.1 fixed this problem for me.
python get-pip.py
/tmp
directorysudo -H python /tmp/get-pip.py --no-index --find-links=/tmp pip
In case anyone stumbles upon this problem, my solution was to change the packaging version from 22.0 to 21.3.
© 2022 - 2024 — McMap. All rights reserved.