I am trying to import Chimera in a python script but get the following error message: Traceback (most recent call last): File "./chimera_import.py", line 16, in <module> import chimera File "/usr/local/chimera/share/chimera/__init__.py", line 15, in <module> from _chimera import * ImportError: /usr/local/chimera/lib/_chimera.so: wrong ELF class: ELFCLASS32 Does anyone know what the problem is here? I can run Chimera without a problem in the GUI -- so i would assume that means the chimera class is being properly loaded in that instance. I have the 32 bit Linux version installed on my AMD64 system running SUSE. Thanks for your help, ryan
Hi Ryan, You can't import chimera into a "stock" Python interpreter. Due to some issues with using C++ classes as types, Chimera uses a custom version of Python. What you can do is use Chimera's version of Python as your interpreter, which you can do with "chimera --nogui yourScript.py". Now, frequently you want your script to take arguments -- and you want Chimera to pass them off to your script without using them itself. To do this you use the new "--script" argument and the "--" argument to indicate the end of Chimera's arguments and the start of the script's arguments, something like: chimera --nogui --script yourScript.py -- yourArg1 yourArg2 ... You need to get the current production release candidate if you need the --script support. --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu On Nov 7, 2007, at 4:51 PM, Ryan wrote:
I am trying to import Chimera in a python script but get the following error message:
Traceback (most recent call last): File "./chimera_import.py", line 16, in <module> import chimera File "/usr/local/chimera/share/chimera/__init__.py", line 15, in <module> from _chimera import * ImportError: /usr/local/chimera/lib/_chimera.so: wrong ELF class: ELFCLASS32
Does anyone know what the problem is here? I can run Chimera without a problem in the GUI -- so i would assume that means the chimera class is being properly loaded in that instance. I have the 32 bit Linux version installed on my AMD64 system running SUSE. Thanks for your help,
ryan
_______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (2)
-
Eric Pettersen
-
Ryan