Viewing 9 reply threads
  • Author
    Posts
    • #714
      Anonymous

        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 os

        Can someone please shed light on this for me?

        Thanks!
        Irene Newhouse

      • #4727
        Anonymous

          “os” is a central Python module. The fact that your python interpreter cannot find it is concerning. What version of python is installed…?

        • #4730
          Anonymous

            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

          • #4732
            Anonymous

              It’s probably a pathing thing. What happens if you write your own python script (hello world is sufficient) and try to import os?

            • #4744
              Anonymous

                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!

              • #4747
                Anonymous

                  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.)

                • #4749
                  Anonymous

                    Thanks, I will.

                  • #4777
                    Anonymous

                      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!!

                    • #4778
                      Anonymous

                        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!

                      • #4781
                        Anonymous

                          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.

                      Viewing 9 reply threads
                      • You must be logged in to reply to this topic.