mutate script from modeller site
Hello, I am trying to use mutate.py script from modeller site http://salilab.org/modeller/wiki/Mutate%20model
I have python2.5 core and devel packages installed. When I run > mod9v5 - 1klc.nodummies.chains.pdb 500 ARG B < mutate.py > out (according to the instructions in the header of the script) I get the following error
========================================== 'import site' failed; use -v for traceback Traceback (most recent call last): File "(stdin)", line 2, in ? ImportError: No module named os ==========================================
Setting $PYHTONHOME to /usr/lib64/python2.5 (where os.py is located) does not help.
Copying os.py to local folder results in the following error
======================================================================= 'import site' failed; use -v for traceback Traceback (most recent call last): File "<string>", line 1, in ? File "/usr/local/modeller/modlib/modeller/__init__.py", line 45, in ? import os.path, re, sys File "os.py", line 134 from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep, ^ SyntaxError: invalid syntax =======================================================================
I seriously doubt that there is an error in os.py file of my python distribution.
Any suggestions? Thanks!
DimitryASuplatov wrote: > I am trying to use mutate.py script from modeller site > http://salilab.org/modeller/wiki/Mutate%20model > > I have python2.5 core and devel packages installed. When I run >> mod9v5 - 1klc.nodummies.chains.pdb 500 ARG B < mutate.py > out > (according to the instructions in the header of the script) > I get the following error > > ========================================== > 'import site' failed; use -v for traceback > Traceback (most recent call last): > File "(stdin)", line 2, in ? > ImportError: No module named os
See #2 at http://salilab.org/modeller/release.html#issues
Modeller has a built-in copy of the Python 2.3 interpreter, but you don't have the 2.3 modules installed (you have 2.5). As you go on to discover, you can't mix and match 2.5 modules with the 2.3 interpreter.
The solution detailed in the release notes is not to use 'mod9v5' to run your script, but instead to treat it as a 'normal' Python script and use your system's "python" binary to run it. In order for this to work though, the Modeller Python libraries need to be in your Python path, and this depends on how you installed Modeller.
If you installed from the RPM, everything should be already set up for you. Just replace your command line with python mutate.py 1klc.nodummies.chains.pdb 500 ARG B > out
If you installed from the .tar.gz, the installer will have told you how to set up the paths so that the above command line works. Alternatively, you can prefix that command line with <TOP>/bin/modpy.sh (where <TOP> is the directory you installed Modeller in) to set the paths just for that script.
Ben Webb, Modeller Caretaker
participants (2)
-
DimitryASuplatov
-
Modeller Caretaker