[Python] Problems with module install after upgrade

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

[Python] Problems with module install after upgrade

Postby leke » Mon Feb 20, 2012 7:10 pm

Hi, I recently upgraded my python 2.6 to 2.7, but am having some problems installing modules. I've downloaded the feedparser module and the readme instructed me to have either distutils or setuptools installed (which I have) and then to run "python setup.py install" from the module's root directory.

Here's the error I get...
Code: Select all
asdf@asdf-laptop ~/Desktop/feedparser-5.1 $ python setup.py install
Traceback (most recent call last):
  File "setup.py", line 1, in <module>
    from setuptools import setup
ImportError: No module named setuptools

Any idea how I can get python 2.7 to recognise setuptools or vice versa?

Thanks in advance.
User avatar
leke
LXF regular
 
Posts: 507
Joined: Mon Oct 22, 2007 5:45 pm
Location: Oulu, Finland

Postby nelz » Mon Feb 20, 2012 11:21 pm

It is possible that setuptools has been installed in the python 2.6 modules directory. Try reinstalling setuptools,and anything else that installed python modules.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8553
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby leke » Tue Feb 21, 2012 7:07 am

Sorry, forgot to mention, I reinstalled setuptools and installed distutils for the first time before I tried to install the module.
I'll google how to check if setuptools is pointing to the correct python version.
User avatar
leke
LXF regular
 
Posts: 507
Joined: Mon Oct 22, 2007 5:45 pm
Location: Oulu, Finland

Postby leke » Tue Feb 21, 2012 7:26 am

Ok, fixed it. I had to run ez_install.py (which pointed setuptools to the correct python version) and afterwards, was able to install the feedparser module without problems.

Thanks for the guidance ;)
User avatar
leke
LXF regular
 
Posts: 507
Joined: Mon Oct 22, 2007 5:45 pm
Location: Oulu, Finland


Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron