Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: ImportError: No module named pkg_resources [duplicate]

In order to run Pelican, I installed python2.7 and modified first line of file /usr/bin/pelican-quickstart

from:

#!/usr/bin/python

to

#!/usr/bin/env python

when I type pelican-quickstart an error occured:

Traceback (most recent call last):
  File "/usr/bin/pelican-quickstart", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

I found "pkg_resources" is in this directory:

/usr/lib/python2.6/site-package/

I'm wondering if I have to install some packages after python2.7 is installed? or, how can I solve this problem.

like image 407
hack4m Avatar asked Mar 03 '14 13:03

hack4m


1 Answers

The problem must be an issue with your setup tools, try the following:

pip install --upgrade setuptools
pip install --upgrade distribute

If this solution doesn't work, you can check the following answer

like image 88
Leonardo Avatar answered Oct 16 '22 08:10

Leonardo