[chimera-dev] [Chimera-users] Import Chimera Modules
Tom Goddard
goddard at sonic.net
Mon Mar 18 14:48:03 PDT 2013
Hi Jon,
I'm switching this discussion to the chimera developer mailing list
since it is so technical. I'm wondering why you want to run Chimera in
your own Python. Often people want that so they can install their own
custom Python modules and use them with Chimera. We recommend just
using the Chimera Python for that and installing your other modules into
the Chimera Python. That saves you a lot of grief trying to do what you
did -- set up the environment to get Chimera to start in another Python.
Tom
-------- Original Message --------
Subject: Re: [Chimera-users] Import Chimera Modules
From: Jonathan Williams
To: Tom Goddard
Date: 3/18/13 2:37 PM
> Hi Tom,
>
> Good news: I got the chimera modules to import!
>
> I think that you were correct about having an older
> libfreetype.6.dylib that was being used instead of Chimera's version,
> probably from my Enthought Python Distribution . Overall I believe
> that my EPD was making things harder for me. So I removed the EPD
> from my system, set all of the environment variables per the Chimera
> IDLE, added ~/Resources/lib and ~/Resources/share to PYTHONPATH, and
> now I'm in business.
>
> Thank you for your help and suggestions!
>
> Jon
>
>
> On Mar 18, 2013, at 12:49 PM, Tom Goddard <goddard at sonic.net
> <mailto:goddard at sonic.net>> wrote:
>
>> Hi Jon,
>>
>> Chimera includes the version of libfreetype.6.dylib it needs. The
>> error must mean you have another older libfreetype.6.dylib on your
>> system that Chimera is getting instead of its own version. The first
>> thing would be to try to locate where the other libfreetype.6.dylib
>> is. I guess Chimera starts on your machine, so somehow it gets the
>> right library. That suggests that you do not have the environment
>> variables that control library loading setup in the same way as
>> Chimera does. I'd suggest you start Chimera, open the IDLE shell
>> window (Tools / General Controls) and print all the environment
>> variables seen by the running Chimera using for example
>>
>> import os
>> for k,v in os.environ.items():
>> print k,v
>>
>> and see if those differ from what you are trying outside Chimera.
>>
>> Tom
>>
>>
>>
>> -------- Original Message --------
>> Subject: Re: [Chimera-users] Import Chimera Modules
>> From: Jonathan Williams
>> To: Tom Goddard
>> Date: 3/18/13 8:05 AM
>>> Hi Tom,
>>>
>>> Thanks for the response. I set the DYLD_FALLBACK_LIBRARY_PATH
>>> variable, and I think this took care of my original problem.
>>> However I have encountered a new error:
>>>
>>> ImportError:
>>> dlopen(/Applications/Chimera.app/Contents/Resources/lib/_chimera.so,
>>> 2): Library not loaded: @executable_path/../lib/libfreetype.6.dylib
>>> Referenced from:
>>> /Applications/Chimera.app/Contents/Resources/lib/_chimera.dylib
>>> Reason: Incompatible library version: _chimera.dylib requires
>>> version 15.0.0 or later, but libfreetype.6.dylib provides version 13.0.0
>>>
>>> This seems like I just need to update my FreeType libraries, but I
>>> have not had a chance to try this yet. If you have any other
>>> suggestions, those would be appreciated, otherwise I'll send an
>>> update when I get a chance.
>>>
>>> Thanks again,
>>>
>>> Jon
>>>
>>>
>>> On Mar 15, 2013, at 7:02 PM, Tom Goddard <goddard at sonic.net
>>> <mailto:goddard at sonic.net>> wrote:
>>>
>>>> Hi Jon,
>>>>
>>>> Maybe the trick is Chimera uses environment variable
>>>> DYLD_FALLBACK_LIBRARY_PATH instead of LD_LIBRARY_PATH or
>>>> DYLD_LIBRARY_PATH. Here's the Chimera Mac start-up C++ code that
>>>> sets the environment variables
>>>>
>>>> http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/dist/mac/chimera-aqua.cpp?rev=36787
>>>>
>>>> and a comment on this code change says "Use
>>>> DYLD_FALLBACK_LIBRARY_PATH instead of DYLD_LIBRARY_PATH, so
>>>> system frameworks will get system versions of shared libraries."
>>>>
>>>> Tom
>>>>
>>>>
>>>>
>>>> On Mar 15, 2013, at 2:49 PM, Jonathan Williams wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I am currently trying to import Chimera modules into a non-Chimera
>>>>> python installation. I have referenced previous messages from
>>>>> this mailing list
>>>>> (http://www.cgl.ucsf.edu/pipermail/chimera-users/2009-March/003620.html),
>>>>> and have added the relevant paths to Chimera in the
>>>>> LD_LIBRARY_PATH, PYTHONPATH, and CHIMERA environment variables.
>>>>>
>>>>> However when I try to import Chimera, Midas or "import
>>>>> chimeraInit" followed by "chimeraInit.init([])" I receive the
>>>>> following error:
>>>>>
>>>>> >>> import chimeraInit
>>>>> >>> chimeraInit.init([])
>>>>> Traceback (most recent call last):
>>>>> File "<stdin>", line 1, in <module>
>>>>> File
>>>>> "/Applications/Chimera.app/Contents/Resources/share/chimeraInit.py",
>>>>> line 594, in init
>>>>> import chimera
>>>>> File
>>>>> "/Applications/Chimera.app/Contents/Resources/share/chimera/__init__.py",
>>>>> line 16, in <module>
>>>>> from _chimera import BBox, Camera, Color, ColorGroup,
>>>>> DirectionalLight, LODControl, Lens, LensViewer, Light, Material,
>>>>> MaterialColor, Model, NoGuiViewer, OGLFont, OSLAbbreviation,
>>>>> OpenModels, OpenState, PathFinder, PixelMap, Plane, Point,
>>>>> PositionalLight, Selectable, SharedState, SpotLight, Sphere,
>>>>> Texture, TextureColor, TrackChanges, Vector, Viewer, X3DScene, Xform
>>>>> ImportError:
>>>>> dlopen(/Applications/Chimera.app/Contents/Resources/lib/_chimera.so,
>>>>> 2): Symbol not found: __cg_TIFFClientOpen
>>>>> Referenced from:
>>>>> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
>>>>> Expected in:
>>>>> /Applications/Chimera.app/Contents/Resources/lib/libTIFF.dylib
>>>>> in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
>>>>> >>>
>>>>>
>>>>> I am using MacOSX 10.8.2, Python 2.7.3, and Chimera 1.7 (build
>>>>> 38197) for 64bit Mac.
>>>>>
>>>>> Any help or advice would be greatly appreciated,
>>>>>
>>>>> Jon Williams
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Chimera-users mailing list
>>>>> Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
>>>>> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users
>>>>
>>>
>>
>
>
>
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20130318/8b36366b/attachment.html>
More information about the Chimera-dev
mailing list