[vtkusers] python (2.7) problems compiling with MSVC 2010 64bit

David Gobbi david.gobbi at gmail.com
Tue Jun 7 17:26:10 EDT 2011


Hi Dominik,

The "site" module is the first to be imported, so if it is missing,
then the "PYTHONHOME" (or equivalent) is not set or is incorrect and
python is unable to find its own modules.

If you set PYTHONHOME manually (i.e. as an environment variable) to
the directory where python-2.7 resides, then I am guessing that these
tests will pass.

So... the next question is, why is this happening?  Evidently the
vtkpython executable is missing some critical information that allows
it to find the python-2.7 directory on its own.  The relevant code in
VTK is Wrapping/Python/vtkPythonAppInit.cxx

None of the dashboard machines seem to use python-2.7.

 - David


On Tue, Jun 7, 2011 at 2:44 PM, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
> Below some output from testing log. I get exactly the same error
> (ImportError: No module named site) by just invoking vtkpython from
> command line.
>
> ----------------------------------------------------------
> 59/251 Testing: PythonSmokePython-image
> 59/251 Test: PythonSmokePython-image
> Command: "E:/build/vtk-5.6.1/bin/Release/vtkpython.exe"
> "E:/pack/vtk-5.6.1/Common/Testing/Python/PythonSmoke.py"
> Directory: E:/build/vtk-5.6.1/Common/Testing/Python
> "PythonSmokePython-image" start time: Jun 07 22:27 W. Europe Daylight Time
> Output:
> ----------------------------------------------------------
> ImportError: No module named site
> <end of output>
> Test time =   2.22 sec
> ----------------------------------------------------------
> Test Failed.
> "PythonSmokePython-image" end time: Jun 07 22:27 W. Europe Daylight Time
> "PythonSmokePython-image" time elapsed: 00:00:02
> ----------------------------------------------------------
>
>
>
> On Tue, Jun 7, 2011 at 10:37 PM, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
>> I have compiled python 2.7 in Release mode on MSVC 2010 64bit. I have
>> built vtk-5.6.1 against it (with wrapping enabled). However, I get the
>> below errors when testing the build.
>> My setup is rather standard, I was therefore wondering if there could
>> be something obviously wrong, or 2.7 is simply not yet supported.
>>
>> Regards,
>> Dominik
>>
>> E:\build\vtk-5.6.1>ctest -R Python
>> Test project E:/build/vtk-5.6.1
>>    Start  59: PythonSmokePython-image
>> 1/6 Test  #59: PythonSmokePython-image ......................***Failed    2.22 s
>> ec
>>    Start  60: TestWeakrefPython-image
>> 2/6 Test  #60: TestWeakrefPython-image ......................***Failed    0.09 s
>> ec
>>    Start  61: TestNumpySupportPython-image
>> 3/6 Test  #61: TestNumpySupportPython-image .................***Failed    0.09 s
>> ec
>>    Start  62: TestTerminationCrashPython-image
>> 4/6 Test  #62: TestTerminationCrashPython-image .............***Failed    0.08 s
>> ec
>>    Start  63: TestExecuteMethodFinalizeCrashPython-image
>> 5/6 Test  #63: TestExecuteMethodFinalizeCrashPython-image ...***Failed    0.09 s
>> ec
>>    Start 237: kMeansDistanceCalculatorPython
>> 6/6 Test #237: kMeansDistanceCalculatorPython ...............***Failed    0.08 s
>> ec
>>
>> 0% tests passed, 6 tests failed out of 6
>>
>> Total Test time (real) =   3.50 sec
>>
>> The following tests FAILED:
>>         59 - PythonSmokePython-image (Failed)
>>         60 - TestWeakrefPython-image (Failed)
>>         61 - TestNumpySupportPython-image (Failed)
>>         62 - TestTerminationCrashPython-image (Failed)
>>         63 - TestExecuteMethodFinalizeCrashPython-image (Failed)
>>        237 - kMeansDistanceCalculatorPython (Failed)
>> Errors while running CTest
>>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list