[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [modeller_usage] Modeller usage with Python 2.4?



I installed the tar bzip2 source of python 2.3.5 from the main python ftp site. The install for SUSE 9.3 worked great like this:

cd /tmp
bunzip2 -c python2.3.5.tar.bz2 | tar xvf -
cd python2.3.5
./configure --prefix=/usr
make
make install

then I did what the Modeller docs suggest and in the bash shell I was going to run Modeller from I defined:

PYTHONHOME=/usr/lib/python2.3.5

then ran Modeller 8v2 from that shell. It picked up the 2.3 based modules not built into Modeller from the external 2.3 install.

I did try using checkinstall instead of "make install" at first but it failed with errors near the end so I couldn't get an rpm of python. I'm sure an rpm could be built for someone who wanted to put in the time, but this standard method worked for me. I just wanted to post this for those who need to get this functionality working.
Dow


Modeller Caretaker wrote:
Dow_Hurst wrote:
After perusing the archives for explanations of Modeller and Python
interactions, it isn't apparent to me that Modeller couldn't use a
later interpreter and modules if the paths are set correctly.

The Python interpreter is built into the executable, so you cannot use a different one. You can, however, use other *modules*, as long as they are compatible with the Python 2.3 interpreter. This generally means that earlier pure Python (.py) modules will work, or later .py modules that do not require any 2.4 features will also work. What will generally _not_ work, however, are any modules which have a binary component (i.e. .pyd, .dll, or .so files) as these generally require a specific Python interpreter version.

I understand that Modeller can be made aware of standard python 2.3 modules with the PYTHONHOME variable. However, I haven't found a clear yes or no on using a Python 2.4 standard installation with Modeller. Is it possible to disable the internal Python 2.3 interpreter linked into Modeller and force Modeller to use a system's
 Python 2.4 installation?

No.

If not, then I could just compile/install
Python 2.3.  I use SUSE 9.3 and 10.0 mainly at the moment in our lab
at UNCG on all the machines so I don't have a native install of the
older Python.  Uninstalling Python 2.4 breaks several packages so a
side by side compile/install is probably easiest.

I certainly recommend this approach:
http://salilab.org/modeller/8v2/manual/node10.html
Compiling Python 2.3 from source is fairly straightforward on a modern Linux system, and you can install in /usr/local or some other location which won't conflict with the existing 2.4 install.

The next release of Modeller will be available as a 'true' Python module, so will be interoperable with any sufficiently recent Python interpreter.

    Ben Webb, Modeller Caretaker