Member Site › Forums › PyRosetta › PyRosetta – Build/Install › python problems
- This topic has 9 replies, 2 voices, and was last updated 13 years, 12 months ago by Anonymous.
-
AuthorPosts
-
-
December 10, 2010 at 7:41 pm #714Anonymous
I’m trying to install Rosetta on a Centos system using the comman in rosetta_source/readme.txt:
python external/scons-local/scons.py . I get the error message: ImportError: No module named osCan someone please shed light on this for me?
Thanks!
Irene Newhouse -
December 10, 2010 at 7:47 pm #4727Anonymous
“os” is a central Python module. The fact that your python interpreter cannot find it is concerning. What version of python is installed…?
-
December 10, 2010 at 8:37 pm #4730Anonymous
I just upgraded my OS to Centos & the updates are current. In /usr/lib there’s a directory python2.4. In /usr/bin there’s entries python, python2 & python2.4. Oddly enough, another program, modeller9v8, has no problems with my python installation & runs properly.
Irene
-
December 11, 2010 at 12:07 am #4732Anonymous
It’s probably a pathing thing. What happens if you write your own python script (hello world is sufficient) and try to import os?
-
December 13, 2010 at 7:08 pm #4744Anonymous
Starting from a basic hello script that does print, when I add import os it fails to import… It does sound like pathing; any recommendations? As I said before, python, python2 [a symbolic link to python] & python2.4 are all in my /usr/bin. The command ‘which python’ locates all 3 & echoing $PATH includes /usr/bin
Thanks!
-
December 13, 2010 at 7:34 pm #4747Anonymous
My best recommendation would be try asking general python or centos forums. If it fails on hello world it’s clearly not Rosetta, and I’m clearly not an expert on python. (In other words, I’d help if I could, but I can’t.)
-
December 13, 2010 at 11:42 pm #4749Anonymous
Thanks, I will.
-
December 22, 2010 at 9:02 pm #4777Anonymous
Yes, it was a pathing thing. It may be buried deep, deep in the documentation, but no one told me that $PYTHONPATH would be automatically set to an incorrect value by the new OS. Actually, I think the old OS was doing it too, but there were other reasons to change, so that’s OK. I figured out the correct setting for PYTHONPATH & now scons.py can import all sorts of modules it couldn’t before, like os. HOWEVER it still crashes on “import time”. I found that the import calls relate to files in $PYTHONPATH. My version of python is 2.4.3. scons.py calls for 2.4 So the module names SHOULD be compatible. There are no files called time in $PYTHONPATH, nor anywhere else that ‘find’ can reach. There is a timeit. Does anyone know if these are equivalent? Has anyone managed to bring up rosetta on a Centos box recently?
I’ve been experimenting with substituting timeit for time, just to see what happens. I found it in 2 places & fixed it, but there’s a 3rd call so deep in the scons calling hierarchy I haven’t managed to find it yet…
Thanks for any advice!!
-
December 23, 2010 at 7:05 pm #4778Anonymous
I tracked the “import time” statements right into timeit.py – part of python! I’m off to bug the Centos forum again [the general python forum hasn’t been as helpful].
Happy Holidays!
-
December 28, 2010 at 6:21 am #4781Anonymous
It turns out that python doesn’t need to have PYTHONPATH or PYTHONHOME set, which the OS was doing. With unset commands in my .bashrc, python works properly.
-
-
AuthorPosts
- You must be logged in to reply to this topic.