You are here

rosettautil module not imported cleanly by python scripts

2 posts / 0 new
Last post
rosettautil module not imported cleanly by python scripts
#1

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

Post Situation: 
Tue, 2013-08-27 01:25
franfdez

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)

Thu, 2013-08-29 11:41
rmoretti