Fix for ‘ImportError: No module named pkg_resources’ error


You will see this error when you try to install a PIP  package. This error message means Python setuptools is missing or broken.

$sudo pip2.7
Traceback (most recent call last):
  File "/usr/bin/pip2.7", line 6, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources


Just re-install the Python setuptools to fix the issue.

sudo yum reinstall python27-setuptools

If your Python version is 3.x, then you should install corresponding version of setuptools. Eg. For Python3.4,

sudo yum reinstall python34-setuptools

Happy fixing 🙂

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top