Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
I have a non-satisfactory work around for this...which just raises more
uestions (see bottom of post)
Trying to get Mayavi (vtk) working for python(x,y)
Operating Windows 7 (32-bit)
Downloaded and installed python(x,y) version 2.7.5.0
Tried this in spyder:
from mayavi import mlab
Got this error:
ValueError: API 'QString' has already been set to version 1
In Preferences-->External Modules-->PyQt I changed "API selection for QString
and QVariant objects:" from "Default API"to "API #2"
Restarted spyder; again tried:
from mayavi import mlab
Got this error:
Traceback (most recent call last):
File "C:\Users\Rohan Walker\Desktop\mayavi stuff.py", line 22, in <module>
from mayavi import mlab
File "C:\Python27\lib\site-packages\mayavi\mlab.py", line 27, in <module>
from mayavi.tools.camera import view, roll, yaw, pitch, move
File "C:\Python27\lib\site-packages\mayavi\tools\camera.py", line 25, in <module>
from engine_manager import get_engine
File "C:\Python27\lib\site-packages\mayavi\tools\engine_manager.py", line 14, in <module>
from mayavi.core.engine import Engine
File "C:\Python27\lib\site-packages\mayavi\core\engine.py", line 12, in <module>
import vtk
File "C:\Python27\lib\site-packages\vtk\__init__.py", line 88, in <module>
__helper.refine_import_err('charts', 'vtkChartsPython', exc)
File "C:\Python27\lib\site-packages\vtk\__helper.py", line 32, in refine_import_err
raise LinkError, str(exc)
vtk.__helper.LinkError: DLL load failed: The specified procedure could not be
found.
Tried:
import vtk
Got the error:
Traceback (most recent call last):
File "C:\Users\Rohan Walker\Desktop\mayavi stuff.py", line 24, in <module>
import vtk
File "C:\Python27\lib\site-packages\vtk\__init__.py", line 88, in <module>
__helper.refine_import_err('charts', 'vtkChartsPython', exc)
File "C:\Python27\lib\site-packages\vtk\__helper.py", line 32, in refine_import_err
raise LinkError, str(exc)
vtk.__helper.LinkError: DLL load failed: The specified procedure could not be
found.
Now if i go into I go open up "C:\Python27\Lib\site-packages\vtk\__init__.py"
and comment out:
try:
from vtkChartsPython import *
kits.append('charts')
except ImportError, exc:
__helper.refine_import_err('charts', 'vtkChartsPython', exc)
My "vtkChartsPython" DLL load failed error goes away. But then I get similar
errors but for "vtkGeovisPython", "vtkInfovisPython", "vtkViewsPython",
"vtkQtPython". If I comment out all those imports then my "import vtk" works
and so does my "from mayavi import mlab".
I can now run the following mayavi demo from
http://docs.enthought.com/mayavi/mayavi/mlab.html#id5:
from numpy import pi, sin, cos, mgrid
dphi, dtheta = pi/250.0, pi/250.0
[phi,theta] = mgrid[0:pi+dphi*1.5:dphi,0:2*pi+dtheta*1.5:dtheta]
m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;
r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + sin(m4*theta)**m5 + cos(m6*theta)**m7
x = r*sin(phi)*cos(theta)
y = r*cos(phi)
z = r*sin(phi)*sin(theta)
# View it.
from mayavi import mlab
s = mlab.mesh(x, y, z)
mlab.show()
That's ok but what's going on with, and do I need "vtkChartsPython",
"vtkGeovisPython", "vtkInfovisPython", "vtkViewsPython", and "vtkQtPython"?
Looking in the "C:\Python27\Lib\site-packages\vtk\" folder I find
"vtkCharts.dll", "vtkChartsPython.pyd", "vtkChartsPythonD.dll" with the same
files corresponding to the other import errors. If there are DLL files there
why would I get "DLL load failed" errors?
Original comment by rtrwal...@gmail.com
on 19 Sep 2013 at 12:03
please try 2.7.5.1
Original comment by grizzly.nyo
on 6 Oct 2013 at 5:41
Original comment by grizzly.nyo
on 6 Oct 2013 at 5:41
I also get dll load failure when importing vtk with version 2.7.5.1.
Any suggestion?
thanks
Original comment by iara....@gmail.com
on 20 Nov 2013 at 4:08
VTK was completly rebuilt and VTK 5.10.1 should be used.
Original comment by grizzly.nyo
on 28 May 2014 at 8:25
Original issue reported on code.google.com by
rqi...@gmail.com
on 8 Aug 2013 at 6:27