[vtkusers] VTK+Python on Mac OS X - no module named vtk error in Python
Prashanth
prashanth.dumpuri at gmail.com
Sat Jun 6 11:32:47 EDT 2015
Thanks, David.
I now get this error - "No module named vtkCommonCorePython". Below is the
complete error message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/MyPrograms/VTK-6.2.0-Build/Wrapping/Python/vtk/__init__.py", line
39, in <module>
from vtkCommonCore import *
File
"/Users/prashanthdumpuri/MyPrograms/VTK-6.2.0-Build/Wrapping/Python/vtk/vtkCommonCore.py",
line 1, in <module>
from vtkCommonCorePython import *
ImportError: No module named vtkCommonCorePython
And, for the record here's a list of my .bash_profile variables
PYTHONPATH
/MyPrograms/VTK-6.2.0-Build/Wrapping/Python:/MyPrograms/VTK-6.2.0-Build/bin/Debug:/MyPrograms/VTK-6.2.0-Build/bin/Release
DYLD_LIBRARY_PATH
/MyPrograms/VTK-6.2.0-Build/lib/Debug:/MyPrograms/VTK-6.2.0-Build/lib/Release
PATH (relevant to VTK)
/MyPrograms/VTK-6.2.0-Build/lib/Debug:/MyPrograms/VTK-6.2.0-Build/lib/Release:/MyPrograms/VTK-6.2.0-Build/lib/Debug:/MyPrograms/VTK-6.2.0-Build/bin/Release:/MyPrograms/VTK-6.2.0-Build/lib/Debug:/MyPrograms/VTK-6.2.0-Build/bin/Debug
Prashanth
On Sat, Jun 6, 2015 at 7:20 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> Follow up: I had an obvious error in my DYLD_LIBRARY_PATH, it should be
> the "lib" directory in VTK 6 (it used to be "bin" in VTK 5). I must rely
> on the rpath too much these days...
>
> export DYLD_LIBRARY_PATH=/Volumes/Work/Kitware/vtk-build/lib
>
> - David
>
> On Sat, Jun 6, 2015 at 7:56 AM, David Gobbi <david.gobbi at gmail.com> wrote:
>
>> Hi Prashanth,
>>
>> The LD_LIBRARY_PATH variable is ignored on OS X, use DYLD_LIBRARY_PATH
>> instead. This is how the variables are set on my system:
>>
>> export PATH=/Volumes/Work/Kitware/vtk-build/bin:$PATH
>> export DYLD_LIBRARY_PATH=/Volumes/Work/Kitware/vtk-build/bin
>> export
>> PYTHONPATH=/Volumes/Work/Kitware/vtk-build/Wrapping/Python:/Volumes/Work/Kitware/vtk-build/lib
>> export TCLLIBPATH=/Volumes/Work/Kitware/vtk-build/Wrapping/Tcl/
>>
>> - David
>>
>>
>> On Sat, Jun 6, 2015 at 7:07 AM, Prashanth <prashanth.dumpuri at gmail.com>
>> wrote:
>>
>>> All,
>>>
>>> I'm trying to use Python Wrapping for VTK on Mac OS. I'm running Mac OS
>>> X 10.10.3 and used cmake 3.2.2, XCode 6.3.2, Python 2.7, VTK-6.2 to build
>>> VTK. (I made sure Shared libraries and Python wrapping were turned on
>>> during cmake process).
>>>
>>> Everything built fine but I get '*No module named vtk*' error when I
>>> try to 'import vtk' in a python shell. Below are my .bash_profile variables
>>>
>>> ---------------------------------------------------------
>>> export PATH=
>>> ~/MyPrograms/VTK-6.2.0-Build/lib/:~/MyPrograms/VTK-6.2.0-Build/bin:$PATH
>>>
>>> export
>>> PYTHONPATH=~/MyPrograms/VTK-6.2.0/Wrapping/Python:~/MyPrograms/VTK-6.2.0-Build/bin
>>>
>>> export LD_LIBRARY_PATH=~/MyPrograms/VTK-6.2.0-Build/lib/
>>>
>>> export DYLD_FALLBACK_LIBRARY_PATH=~/MyPrograms/VTK-6.2.0-Build/bin/
>>>
>>> ---------------------------------------------------------
>>>
>>> Can someone please help me fix this error?
>>>
>>> Prashanth
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150606/62147c38/attachment.html>
More information about the vtkusers
mailing list