rosettautil module not imported cleanly by python scripts

Member Site Forums Rosetta 3 Rosetta 3 – General rosettautil module not imported cleanly by python scripts

Viewing 1 reply thread
  • Author
    Posts
    • #1704
      Anonymous

        Dear all,

        I came across the clustering.py script from the rosetta-3.5/rosetta_tools/protein_tools/scripts/ directory. As many other scripts within the scripts directory, that one depends on the rosettautil module found one directory up (protein_tools). When I run the clustering.py script it fails with an ImportError message stating that the rosettautil modules (.rosetta and .util in my case) cannot be found. Although I can make the script work by simply copying the whole rosettautil directory into the scripts directory, the whole procedure makes me feel uneasy. Is there a better way of doing this? Is this ImportError a known limitation of the current install or is it a bug?

        Thanks in advance,

        Francisco

      • #9248
        Anonymous

          Python needs to be told where the modules are. If you aren’t running it out of the directory where the script is, you need to alter your PYTHONPATH environment variable to point to that directory. (see http://docs.python.org/2/using/cmdline.html#envvar-PYTHONPATH)

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.