[vtkusers] Fwd: python path configuration [on OSX, with macports]
Darren Weber
darren.weber.lists at gmail.com
Tue Apr 7 20:36:40 EDT 2009
I've got a dynamic link issue (see below) and could use some expert advice
on the best way to resolve this for OSX. I want to avoid RPATH settings, if
possible.
Thanks, Darren
---------- Forwarded message ----------
From: Darren Weber <darren.weber.lists at gmail.com>
Date: Tue, Apr 7, 2009 at 5:20 PM
Subject: Re: python path configuration
To: macports-dev at lists.macosforge.org
Thanks, Bryan.
I found an option to specify an install
--prefix='/opt/local/Library/Frameworks/Python.framework/Versions/2.6/'
That provided an installation into
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/VTK-5.4.0-py2.6.egg/vtk/
That part is good, but it doesn't work due to dlopen issues (argh), eg:
Python 2.6.1 (r261:67515, Jan 30 2009, 11:23:18)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/VTK-5.4.0-py2.6.egg/vtk/__init__.py",
line 41, in <module>
from common import *
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/VTK-5.4.0-py2.6.egg/vtk/common.py",
line 7, in <module>
from libvtkCommonPython import *
ImportError:
dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/VTK-5.4.0-py2.6.egg/vtk/libvtkCommonPython.so,
10): Library not loaded: libvtkCommonPythonD.5.4.dylib
Referenced from:
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/VTK-5.4.0-py2.6.egg/vtk/libvtkCommonPython.so
Reason: image not found
>>>
So now I have to track down how the libraries were linked and check paths
and stuff for that.
Take care, Darren
On Tue, Apr 7, 2009 at 1:38 PM, Bryan Blackburn <blb at macports.org> wrote:
> On Tue, Apr 07, 2009 at 12:57:02PM -0700, Darren Weber said:
> > I am doing some manual testing of the build and install for VTK 5.4,
> which
> > has python wrapping. In the course of this testing, I've stumbled across
> an
> > installation issue with python 2.6. I can't proceed without knowing more
> > about this should be handled within macports. Any advice and pointers to
> > more information would be really handy!
>
> Try setting PYTHONPATH to python.prefix (which is defined in the python
> groups), ${frameworks_dir}/Python.framework/Versions/${python.branch}
> (where
> python.branch would be 2.6 in this case). So something like
>
> configure.env PYTHONPATH="${frameworks_dir}/Python.framework/Versions/2.6"
>
> Since there is no ${prefix}/lib/python2.6 and hence no site-packages under
> that, if you can't specify the python prefix separately, using PYTHONPATH
> seems like it may work. And in case anyone asks, using a symlink in
> ${prefix}/lib for python2.6 won't work or we'll run into the python25 issue
> of 'not a directory'.
>
> Bryan
>
> [...]
>
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090407/05619516/attachment.htm>
More information about the vtkusers
mailing list