LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-04-2009, 04:18 AM   #1
km0r3
LQ Newbie
 
Registered: Oct 2009
Distribution: Ubuntu, SME, Arch
Posts: 11

Rep: Reputation: 1
Unhappy Ubuntu 9.10 - Error importing python modules - $PYTHONPATH?


Hello Forum,

I have been recently encountering problems when, trying to run *ANY* Python program. I get an import error and a warning to verify my PYTHONPATH.
This happened when I removed python-sphinx with apt-get, but I think it's not the reason.

Sample:
$ hg

OUTPUT:
abort: couldn't find mercurial libraries in [/usr/bin /usr/local/lib/python2.6/dist-packages/vipy-0.4-py2.6.egg /usr/local/lib/python2.6/dist-packages/nose-0.11.1-py2.6.egg /usr/local/lib/python2.6/dist-packages/rope-0.9.2-py2.6.egg /usr/local/lib/python2.6/dist-packages/Sphinx-0.6.3-py2.6.egg /usr/local/lib/python2.6/dist-packages/django_html-0.0.1-py2.6.egg /usr/local/lib/python2.6/dist-packages/html5lib-0.11.1-py2.6.egg /home/kenny/Projects/soclone-read-only /home/kenny/python/Django /home/kenny/python/pysmell /home/kenny/python/Django/ropemode /home/kenny/python/Django/rope /home/kenny/python/lib /usr/lib/pymodules/python2.6/mercurial /usr/lib/python2.6 /usr/lib/python2.6/plat-linux2 /usr/lib/python2.6/lib-tk /usr/lib/python2.6/lib-old /usr/lib/python2.6/lib-dynload /usr/local/lib/python2.6/dist-packages]
(check your install and PYTHONPATH)


I could just go on like this..
The only Python program actually executing is the Python Interpreter itself, but also importing program-specific libraries doesn't work; only essential modules like sys, os are available.

The sys.path corresponds to the upper listing.

Is there any way to correct this issue?
 
Old 12-05-2009, 02:34 AM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,198

Rep: Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120
Sounds like the uninstall of python-sphinx did something nasty. Have you tried reinstalling python and/or nonworking programs?

eg
Code:
sudo apt-get install --reinstall python2.5 mercurial mercurial-common python-beaker python-sqlalchemy
I'm just guessing your python version here.

Cheers,

Evo2.

Last edited by evo2; 12-05-2009 at 02:35 AM. Reason: Typo
 
1 members found this post helpful.
Old 12-05-2009, 08:25 AM   #3
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,591

Rep: Reputation: 162Reputation: 162
I've said it before, but here goes: Unstable releases are not supposed to work right. 9.10 is for people who want to make bug reports.
 
Old 12-06-2009, 04:23 AM   #4
km0r3
LQ Newbie
 
Registered: Oct 2009
Distribution: Ubuntu, SME, Arch
Posts: 11

Original Poster
Rep: Reputation: 1
Hello,

Reinstalling with apt-get didn't help anything, neither experimenting with *dpkg*

Well, I restored from a backup and now it's functioning again. I just wanted to avoid further headache.

Quote:
I've said it before, but here goes: Unstable releases are not supposed to work right. 9.10 is for people who want to make bug reports.
I thought 9.10 is a stable release?

Regards,
Kenny
 
Old 12-06-2009, 09:18 PM   #5
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,198

Rep: Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120
Quote:
Originally Posted by km0r3 View Post
Reinstalling with apt-get didn't help anything, neither experimenting with *dpkg*
I think its probably a matter of working out exactly what needed to be reinstalled.

Quote:
Well, I restored from a backup and now it's functioning again. I just wanted to avoid further headache.
Did you check bug reports? If you can't find one that describes what happened, you should submit one.

Quote:
I thought 9.10 is a stable release?
It's supposed to be, but different distributions have different standards regarding what constitutes a "stable release". Ever considered using Debian ;-)

Cheers,

Evo2.
 
  


Reply

Tags
python, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dpkg 1.14.24 error processing python-textile (..) Ubuntu 9.04 km0r3 Linux - Software 0 10-13-2009 07:09 PM
swig 13.3.39, ubuntu 8.10, problem with importing C program to python plugo Linux - Software 3 08-11-2009 01:26 AM
swig 13.3.39, ubuntu 8.10, problem with importing C program to python plugo Linux - Software 1 08-09-2009 09:39 PM
Problem importing python module...cant install anything!!! bpedman Linux - Software 0 02-07-2007 08:02 PM
importing trouble....python...regarding Tkinter maseby Programming 0 11-03-2003 01:54 PM


All times are GMT -5. The time now is 09:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration