zuijiawoniu / pythonxy

Automatically exported from code.google.com/p/pythonxy
0 stars 0 forks source link

VTK doesn't work in 2.7.5.0 #681

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If relevant, please answer to the following questions:
1. What version of Python(x,y) have you installed?
2.7.5.0

2. Which components have you installed (Python(x,y) installer:
componentpage):
    a. Have you selected the "Recommended" component selection?
    b. Have you selected the "Full" component selection?
c. Have you selected manually plugins in the component list?
Whatplugins?
b.

3. Have you selected the option "Customize installation directories"?
a. Yes
b. No
No

4. If the answer to 3. is yes, what installation directories have you
chosen?

5. Where did you install Python(x,y) itself?
a. default path
b. custom path, which one?
a.

6. Have you installed Python(x,y):
    a. For "Current user only"
    b. For "All users"
b.

7. What is your operating system?
a. Windows XP
b. Windows Vista
c. Windows 7
d. Windows 8
c.

8. Is the operating system 64 bit?
a. Yes
b. No
a.

9. When you installed Python(x,y), were you logged in as :
a. a regular user
b. an administrator of the machine
b.

10. If you are using Windows Vista/7, have you installed Python(x,y):
a. simply by double-clicking on the installer
    b. by right-clicking on the installer and selecting "Run as an
administrator"
a.

11. Regarding installed software on your machine, how did you clean your
machine before installing Python(x,y)  (multiple answers are possible):
a. you didn't do anything, you installed Python(x,y) directly on your
machine without precaution
b. you uninstalled any previous Python distribution (including the
official .msi)
c. you cleaned the Windows registry by removing all Python-related keys
d. you cleaned the environment variables by removing all deprecated
entries
b.

What steps will reproduce the problem?
1. Input "import vtk", receive the following error message 

"Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  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."

2.
3.

What is the expected output? What do you see instead?

Please provide any additional information below.

Original issue reported on code.google.com by rqi...@gmail.com on 8 Aug 2013 at 6:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
please try 2.7.5.1

Original comment by grizzly.nyo on 6 Oct 2013 at 5:41

GoogleCodeExporter commented 9 years ago

Original comment by grizzly.nyo on 6 Oct 2013 at 5:41

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
VTK was completly rebuilt and VTK 5.10.1 should be used.

Original comment by grizzly.nyo on 28 May 2014 at 8:25