<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi, <o:p></o:p></p>
<p class="MsoNormal">I am trying to use paraview python scripting from an external python installation (enthought canopy). I am trying this because I could not import successfully scipy in pvpython (namely scipy.signal) .
<o:p></o:p></p>
<p class="MsoNormal">I created a file called paraview.pth in “C:\Users\lb\AppData\Local\Enthought\Canopy\User\Lib\site-packages”. The content of the file is the following:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">C:\\Program Files (x86)\\ParaView 4.0.1\\lib\\paraview-4.0\\site-packages<o:p></o:p></p>
<p class="MsoNormal">C:\\Program Files (x86)\\ParaView 4.0.1\\lib\\paraview-4.0<o:p></o:p></p>
<p class="MsoNormal">C:\\Program Files (x86)\\ParaView 4.0.1\\bin<o:p></o:p></p>
<p class="MsoNormal">C:\\Program Files (x86)\\ParaView 4.0.1\\bin\\python27.zip<o:p></o:p></p>
<p class="MsoNormal">C:\\Program Files (x86)\\ParaView 4.0.1\\bin\\DLLs<o:p></o:p></p>
<p class="MsoNormal">C:\\Program Files (x86)\\ParaView 4.0.1\\bin\\lib<o:p></o:p></p>
<p class="MsoNormal">C:\\Program Files (x86)\\ParaView 4.0.1\\bin\\lib\\plat-win<o:p></o:p></p>
<p class="MsoNormal">C:\\Program Files (x86)\\ParaView 4.0.1\\bin\\lib\\lib-tk<o:p></o:p></p>
<p class="MsoNormal">C:\\Program Files (x86)\\ParaView 4.0.1\\bin<o:p></o:p></p>
<p class="MsoNormal">C:\\Program Files (x86)\\ParaView 4.0.1\\bin\\lib\\site-packages<o:p></o:p></p>
<p class="MsoNormal"><b><o:p> </o:p></b></p>
<p class="MsoNormal">(I copied the paths from the command sys.path in pvpython)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The only relevant difference I can see between the two installation is that Canopy Python version is '2.7.6 | 64-bit | (default, Apr 11 2014, 20:31:44) [MSC v.1500 64 bit (AMD64)]', while in pvpython the version is '2.7.3 (default, Jun
16 2013, 20:21:46) [MSC v.1500 64 bit (AMD64)]'<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When I try to run “import paraview.simple” in canopy I have the following error:
<o:p></o:p></p>
<p class="MsoNormal">Error: Could not import vtkCommonComputationalGeometryPython<o:p></o:p></p>
<p class="MsoNormal">---------------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal">ImportError Traceback (most recent call last)<o:p></o:p></p>
<p class="MsoNormal"><ipython-input-12-4308f7890145> in <module>()<o:p></o:p></p>
<p class="MsoNormal">----> 1 import paraview.simple<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">C:\Program Files (x86)\ParaView 4.0.1\lib\paraview-4.0\site-packages\paraview\simple.py in <module>()<o:p></o:p></p>
<p class="MsoNormal"> 39 paraview.compatibility.major = 3<o:p></o:p></p>
<p class="MsoNormal"> 40 paraview.compatibility.minor = 5<o:p></o:p></p>
<p class="MsoNormal">---> 41 import servermanager<o:p></o:p></p>
<p class="MsoNormal"> 42 <o:p></o:p></p>
<p class="MsoNormal"> 43 #==============================================================================<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">C:\Program Files (x86)\ParaView 4.0.1\lib\paraview-4.0\site-packages\paraview\servermanager.py in <module>()<o:p></o:p></p>
<p class="MsoNormal"> 46 #<o:p></o:p></p>
<p class="MsoNormal"> 47 #==============================================================================<o:p></o:p></p>
<p class="MsoNormal">---> 48 import paraview, re, os, os.path, new, sys, atexit, vtk<o:p></o:p></p>
<p class="MsoNormal"> 49 <o:p></o:p></p>
<p class="MsoNormal"> 50 if not paraview.compatibility.major:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">C:\Program Files (x86)\ParaView 4.0.1\lib\paraview-4.0\site-packages\paraview\vtk\__init__.py in <module>()<o:p></o:p></p>
<p class="MsoNormal"> 5 except ImportError:<o:p></o:p></p>
<p class="MsoNormal"> 6 paraview.print_error("Error: Could not import vtkCommonComputationalGeometryPython")<o:p></o:p></p>
<p class="MsoNormal">----> 7 from vtkCommonCorePython import *<o:p></o:p></p>
<p class="MsoNormal"> 8 from vtkCommonDataModelPython import *<o:p></o:p></p>
<p class="MsoNormal"> 9 from vtkCommonExecutionModelPython import *<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ImportError: DLL load failed: The specified module could not be found.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I searched and vtkCommonComputationalGeometryPython.pyd is present in “C:\Program Files (x86)\ParaView 4.0.1\lib\paraview-4.0” and vtkCommonComputationalGeometryPython27D-pv4.0 in C:\Program Files (x86)\ParaView 4.0.1\bin (then both folder
are already in paraview.pth). I checked with visual studio “dumpbin /headers” that vtkCommonComputationalGeometryPython.pyd is 64 bit.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am using Paraview 4.0 (binaries downloaded from the website) on Windows 7 64 bit.<o:p></o:p></p>
<p class="MsoNormal">Any suggestion?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>