issue with vtk python wrapping: can't import vtk in interpreter but can import in console
Question: I compiled vtk with python wrapping and I can us it on the command line.
However, I am using eclipse IDE and want to use vtk but no matter what I do
with my PYTHONPATH variable, I still get the errors below:

    
    
      from filtering import * 
    File "C:\Development\third-party\vtk-5.6.1\build\Wrapping\Python\vtk\filtering.py", line 9, in <module>
      from vtkFilteringPython import * 
    ImportError: DLL load failed: The specified procedure could not be found.
    

My PATH and PYTHONPATH contain:

    
    
    "C:\Development\third-party\vtk-5.6.1\Wrapping\Python" 
    "C:\Development\third-party\vtk-5.6.1\build\bin\Release" which has the  *.lib, *.pyd, *.dll 
    

In the DOS console, that is all I need and I can "import vtk" with no errors.

However, in eclipse I set the "External Libraries" of my project to contain
the same directories above and I get an error.

The error happens at in the file "C:\Development\third-
party\vtk-5.6.1\Wrapping\Python\vtk__init__.py" : just after loading vtk
"common" library.

    
    
    ... 
    # Load all required kits. 
    from common import * 
    from filtering import * 
    ... 
    

The funny thing is that both vtkcommon and vtkfiltering python (.dll, .lib and
.pyd) are all in the same folder here: "C:\Development\third-
party\vtk-5.6.1\build\bin\Release"

Can someone please help ? Why would import vtk work on console and not in
eclipse IDE ?

I am using Version: Juno Service Release 2 Build id: 20130225-0426 for
eclipse, vtk-5.6, python 2.6.5 and pydev 2.7.3

Can anyone with pydev + vtk experience help me?


Answer: I was having problems with VTK on PyDev and I just found [this
article](http://www.switchcase.org/), to do with PyCUDA on PyDev. It helped me
get things working on Linux.

I followed the instructions there: Go to Run->Run Configurations and add a new
environment variable LD_LIBRARY_PATH

I also found [this forum](http://www.coderanch.com/t/105391/vc/Configuring-
eclipse-dll-files-runtime), which deals with a similar problem on Windows.
They suggest adding

    
    
    -Djava.library.path="{dll path}" 
    

to your runtime args in eclipse. See [this
page](http://wiki.eclipse.org/Eclipse.ini) on the eclipse wiki.

