#16327: vtk5 5.0.3_0 +python build failure -------------------------------+-------------------------------------------- Reporter: casbon@gmail.com | Owner: rene.donner@mac.com Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: Port: vtk5 | -------------------------------+-------------------------------------------- Comment(by truemped@gmail.com): Please note that I am using vtk5 5.2 Portfile which is the current. Replying to [comment:13 truemped@…]: I have nearly achived to install everything correctly. This is my (updated) 'variant' section: {{{ variant python { depends_build-append port:python25 configure.args-delete "-DBUILD_SHARED_LIBS:BOOL=OFF" configure.args-append -DBUILD_SHARED_LIBS:BOOL=ON \ -DPYTHON_DEBUG_LIBRARY:FILEPATH=${prefix}/lib/libpython2.5.dylib \ -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/python2.5 \ -DPYTHON_INCLUDE_PATH:FILEPATH=${prefix}/include/python2.5 \ -DPYTHON_LIBRARY:FILEPATH=${prefix}/lib/libpython2.5.dylib \ -DVTK_WRAP_PYTHON:BOOL=ON \ -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${prefix} --root=${destdir} \ -DCMAKE_BUILD_WITH_INSTALL_PATH:BOOLL=ON } }}} '''port install vtk5 +darwin_9 +python'''
Unfortunately there is no python package "vtk" anymore:
{{{ $ python -c "import vtk" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named vtk }}}
It turns out that if you use '''vtkpython''' and set '''DYLD_LIBRARY_PATH="/opt/local/lib/vtk-5.2/"''' Python finds the vtk package. BUT: If you want to use the '''wx''' part of VTK: {{{ $ DYLD_LIBRARY_PATH="/opt/local/lib/vtk-5.2/" vtkpython simpleWxScriptWithVTK.py This program needs access to the screen. Please run with 'pythonw', not 'python', and only when you are logged in on the main display of your Mac. }}} and: {{{ $ DYLD_LIBRARY_PATH="/opt/local/lib/vtk-5.2/" pythonw2.5 simpleWxScriptWithVTK.py Fatal Python error: Interpreter not initialized (version mismatch?) Abort trap }}} This seems to be some SWIG issue as far as gogol told me. Another problem is the fact that after I have built and installed vtk5 the '''vtk''' python package is not installed in the '''site-packages''' dir. This should have been done with '''${workdir}/Wrappers/Python/setup.py''' Anyone there who can help me? -- Ticket URL: <http://trac.macports.org/ticket/16327#comment:16> MacPorts <http://www.macports.org/> Ports system for Mac OS