Hi Luca,

I want to use some of the vmtk python scripts and libraries to implement my
own application. Basically from python (or ipython) I want to be able to do
"import vtkvmtk". My configuration is:
- Mac OS X 10.6.8
- Python 2.7.3 (installed via Macports)

In order to use vmtk I've tried several approaches:

1. The simpler one: installing binary packages and modifying my
.bash_profile by including "source
/Applications/vmtk.app/Contents/MacOS/vmtk".
    - After doing so I type in ipython: from vmtk import vtkvmtk and I get
this error: *Fatal Python error: Interpreter not initialized (version
mismatch?)*
    - I assume that the reason for this error is that the binary packages
have been compiled with a different python version

2. So I tried the difficult one: to compile VMTK from source. After
following the "Installing from source" procedure, and using the CMake
default values everything goes fine and VMTK is built. I then modify my
.bash_profile accordingly and:
   - After doing so I type in ipython: from vmtk import vtkvmtk and get the
exact same error I got previously: *Fatal Python error: Interpreter not
initialized (version mismatch?)*
*
*
It seems that again the wrong python version has been used during building.
So I checked the CMakeCache.txt file in the VTK-build subdirectory and
found this configuration for python:
PYTHON_EXECUTABLE:FILEPATH=/opt/local/bin/python2.7
PYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Headers
PYTHON_LIBRARY:FILEPATH=/opt/local/lib/libpython2.7.dylib

I think the problem is that PYTHON_INCLUDE_DIR is set to the headers dir of
the python version that already comes with Mac OS X. Actually the correct
PYTHON_INCLUDE_DIR should be
/opt/local/Library/Frameworks/Python.framework/Headers.

Since this directory is set automatically during installation, how can I
correct this problem? How can I compile/install VMTK correctly using my
python version?

Thanks,
Miguel
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
vmtk-users mailing list
vmtk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vmtk-users

Reply via email to