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

Re: [modeller_usage] Problem importing modeller and _modeller modules

Hi Ben, 

I installed the .deb package 64bit, but for some reason it couldn't set pythonpaths correctly. I could solve the problem by adding to paths to pythonpath as you said, as follows:

export PYTHONPATH='$PYTHONPATH:/usr/lib/modeller9.12/lib/x86_64-intel8''
export PYTHONPATH='$PYTHONPATH:/usr/lib/modeller9.12/modlib/'' 

And that solved import problems, but a python problem (listed as bug since python 2.6) showed up: 

undefined symbol: Py_InitModule4

And this was easily solved by editing line 113 in the /usr/include/python2.7/modsupport.h to 

 #define Py_InitModule4 Py_InitModule4_64 

In Mint, I also installed .deb package, but I did not tested above solution yet, but it will probably work.

Thanks for your help.

Gustavo Lima

On Fri, Oct 18, 2013 at 1:43 PM, Modeller Caretaker <" target="_blank">> wrote:
On 10/18/13 7:08 AM, Gustavo Machado Alvares de Lima wrote:
Hi, I'm trying to import modeller modules to python in order to create
custom scripts for my needs. When I used the 32bit version of ubuntu (or
debian), it works perfectly. When I try to run the same script in a
64bit OS, python cant find modeller.

Did you install the .deb package? That should have made suitable symlinks so that everything works without any need for setting random environment variables (obviously you need to install the 32-bit .deb on a 32-bit system, and the 64-bit .deb on a 64-bit system). The .deb files are produced on an Ubuntu 9.10 system, but the Ubuntu folks do have a tendency to move the Python paths around between releases.

in the /usr/lib/modeller9.12/modlib/modeller/__init__.py it tries to import
_modeller module, and that one I cant find/add.

If you want to go down this route, you'll have to add the directory that contains _modeller.so to your Python path as well. Setting LD_LIBRARY_PATH won't help here, because Python doesn't look in that path.

I'm using ubuntu 13.04 64bit, but I have this same problem in some other
distros, like Mint linux (even 32bit on this one).

Did you install the RPM on your Mint system?

        Ben Webb, Modeller Caretaker
" target="_blank">             http://www.salilab.org/modeller/
Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage