Bug 378491 - Python environment not installed correctly
Summary: Python environment not installed correctly
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 6
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: James Antill
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-12 18:52 UTC by Ryan Helinski
Modified: 2007-11-30 22:12 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2007-11-14 15:11:15 UTC


Attachments (Terms of Use)
Output from 'rpm -Va' (20.15 KB, text/plain)
2007-11-13 03:42 UTC, Ryan Helinski
no flags Details
$ sudo rpm -Va | tee rpm-check.txt (3.07 KB, text/plain)
2007-11-13 16:47 UTC, Ryan Helinski
no flags Details

Description Ryan Helinski 2007-11-12 18:52:59 UTC
Description of problem:
I'm not sure what package is not installing or updating correctly, but Python
seems to be broken for some programs. revelation and lyx seem to be affected.
Both cause Python to bail out with the following messages:

$ lyx
LyX: reconfiguring user directory
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/share/lyx/./configure.py", line 11, in ?
    import sys, os, re, shutil, glob
ImportError: No module named os
LyX: Done!
TextClassList::Read: unable to find textclass file  `'. Exiting.

$ revelation
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
warning: local name 'self' in '__init_actions' shadows use of 'self' as global
in nested scope 'lambda'
ImportError: No module named warnings

If I try to fix Python (which I have no experience with):
$ export PYTHONHOME=/usr/lib/python2.4

I still get problems:
$ lyx
LyX: reconfiguring user directory
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/share/lyx/./configure.py", line 11, in ?
    import sys, os, re, shutil, glob
ImportError: No module named os
LyX: Done!
TextClassList::Read: unable to find textclass file  `'. Exiting.

$ revelation 
'import site' failed; use -v for traceback
warning: local name 'self' in '__init_actions' shadows use of 'self' as global
in nested scope 'lambda'
ImportError: No module named warnings

Note that creating this variable causes YUM to produce a similar message--so I'm
probably giving it the wrong path?



Version-Release number of selected component (if applicable):
Installed Packages
lyx.i386                                 1.5.2-1.fc6            installed       
python.i386                              2.4.4-1.fc6            installed       
revelation.i386                          0.4.11-1.fc6           installed 

How reproducible:
I think you can just install the software with YUM in FC6. The only repository I
added was for adobe flash, so all the other software is directly from the Fedora
project. Also, my bash configuration is straight from /etc/skel

Comment 1 Ryan Helinski 2007-11-13 00:29:09 UTC
By the way it's x86 architecture, Linux 2.6.22.9-61.fc6

It's a fresh installation, so I'm willing to start over or just fix the problem
and save a lot of writing/downloading. 

Comment 2 James Antill 2007-11-13 01:44:31 UTC
 Can you try rpm -V python ... or if that produces nothing rpm -Va, as if this
was a real problem with the python package I'd have 666 BZ on it ... so I assume
something went wrong for you. You could also try running ipython, and doing just
import os manually ... if that works I'll happily blame lyx :)

 Also given that it's a new install, why didn't you just go for Fedora 8?


Comment 3 Ryan Helinski 2007-11-13 02:48:12 UTC
Thanks for getting back to me!

'rpm -V python' returns nothing (I've tried this since posting the bug). 
I'll attach the output from 'rpm -V python'. 
I don't know what 666 BZ means. 'ipython' doesn't seem to be an executable.
Assuming you meant 'python', this is the output:

$ python
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Python 2.1c2 (#1, May  7 2001, 15:23:17) 
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import os
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named os
>>> 

I wouldn't blame LyX because Revelation also gives the same problem. Looking at
it, most of the errors are repeated in the python interpreter too. 

I am supposed to have RHEL5 on this university lab machine, but I didn't have
access to the 'extras' repo for some of these same program which are having
trouble, so I installed Fedora. I'd rather stay with FC6 because I am assuming
it is more stable than 7, and my F7 DVD wouldn't read in the old CD drive. (It's
an old Pentium 4 2.53GHz)

Comment 4 Ryan Helinski 2007-11-13 03:00:25 UTC
I'm still waiting on 'rpm -Va', I'll create an attachment as soon as I can.

Comment 5 Ryan Helinski 2007-11-13 03:42:01 UTC
Created attachment 256171 [details]
Output from 'rpm -Va'

Comment 6 James Antill 2007-11-13 04:25:10 UTC
 Well I don't see anything in the rpm -Va about python specifically, but all of
those entries marked as 'S' means that the size is wrong on them (I assume you
didn't run it as root). So something seems very wrong, so given you've only just
installed it it seems easier to just re-install instead of trying to work out
what went wrong.

 666 BZ means I'd have a huge amount of open bugs, if this was a "normal" problem.

 While Fedora 8 might be a bit less stable than Fedora Core 6, Fedora 7 should
be a bit better (if anything) at this point ... and Fedora Core 6 will be going
out of support within a couple of weeks.


Comment 7 Ryan Helinski 2007-11-13 16:47:01 UTC
Created attachment 257051 [details]
$ sudo rpm -Va | tee rpm-check.txt

Added sudo to rpm command--sorry about that

Comment 8 Ryan Helinski 2007-11-14 15:12:50 UTC
Looks like someone mounted in the /usr/local from another machine, which
included an old python binary at /usr/local/bin/python . This is totally a
misunderstanding between me and the owner of the machine. Thanks for the help,
long live Fedora. :)


Note You need to log in before you can comment on or make changes to this bug.