[chimera-dev] chimera import from unmodified python 2.5

Greg Couch gregc at cgl.ucsf.edu
Fri Sep 12 12:53:59 PDT 2008


You should be able to copy chimera's dl module from 
CHIMERA/lib/python2.5/lib-dynload/dl.so to somewhere on your python path,
or create a dummy dl module that has the value of RTLD_GLOBAL for your 
platform (should be the same on all Linux systems).

 	- Greg

On Fri, 15 Aug 2008, Ondrej Marsalek wrote:

> hello again,
>
> On Wed, Aug 13, 2008 at 23:17, Eric Pettersen <pett at cgl.ucsf.edu> wrote:
>> Here's what works for me:
>> env CHIMERA=/usr/local/chimera.dev
>> LD_LIBRARY_PATH=/usr/local/chimera.dev/lib
>> PYTHONPATH=/usr/local/chimera.dev/share:/usr/local/chimera.dev/lib:/usr/local/chimera.dev/lib/python2.5/site-packages
>> python2.5
>> You will have to adjust the above to your local installation, and may want
>> to include the original values of LD_LIBRARY_PATH and PYTHONPATH if they are
>> normally non-empty for you (i.e. in a similar fashion to your original
>> export statements).
>> At the resulting python prompt:
>> from chimeraInit import init
>> init([], nogui=True, script="py:/dev/null")
>> The "script=" keyword arg prevents Chimera from giving you it's own command
>> prompt since you are tricking it into believing that you've provided a
>> script to execute (/dev/null is always an empty file).  Alternatively, you
>> could have just typed "stop" at the prompt that Chimera gave you and gotten
>> back to the python prompt.
>
> thanks, that is what i wanted to achieve and it works on 32bit linux.
> on a 64bit system (amd64, that is), however, i end up with the
> traceback included below and without a working chimera. i think this
> is a bug. i don't know much in that specific area, but it seems that
> the dl module has been removed, see for example
> http://bugs.python.org/issue2470 is this really a bug or is there a
> problem with my setup? i run ubuntu 8.04 on both machines, python is
> version 2.5.2 on the 64bit one. i can provide more information if
> needed.
>
> anyway, i have (at least in principle) a way to achieve the original
> goal and i believe the above mentioned problem will eventually get
> resolved.
>
> thanks,
> ondrej marsalek
>
>
> In [3]: init([], nogui=True, script="py:/dev/null")
> ---------------------------------------------------------------------------
> <type 'exceptions.ImportError'>           Traceback (most recent call last)
>
> /home/andy/<ipython console> in <module>()
>
> /home/andy/CHIMERA/share/chimeraInit.py in init(argv, nogui,
> nomultisample, stereo, bgopacity, visual, screen, root, debug,
> geometry, title, eventloop, exitonquit, nostatus, preferencesFile,
> fullscreen, script, silent)
>    305         if sys.platform in ['linux2', 'irix646', 'irix6-n32']:
>    306                 # make C++ shared libraries work when dlopen'd
> --> 307                 import dl
>    308                 sys.setdlopenflags(sys.getdlopenflags() |
> dl.RTLD_GLOBAL)
>    309
>
> <type 'exceptions.ImportError'>: No module named dl
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev
>



More information about the Chimera-dev mailing list