PythonCalculator does not work on Mac OSX
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The PythonCalculator generates the error shown below, even when using simple cases, such as setting an array to a constant value (which is the first example shown in the wiki for the PythonCalculator). A similar error (included below) occurs when the command "import numpy" in the python shell in Paraview. My guess is that the Paraview fails to distinguish between the python version installed with Paraview, and the python version that is native to Mac OSX system. Best, Mark
Error thrown by PythonCalculator: File "", line 13 retVal = area(inputs[0])mport ^ SyntaxError: invalid syntax Traceback (most recent call last): File "", line 4, in File "/Users/partyd/Projects/ParaView-3.10/build/ParaView-build/Utilities/VTKPythonWrapping/site-packages/paraview/vtk/dataset_adapter.py", line 5, in RuntimeError: This module depends on the numpy module. Please makesure that it is installed properly.
Error thrown by "import numpy" in the Paraview Python shell:
import numpy Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/init.py", line 130, in import add_newdocs File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/add_newdocs.py", line 9, in from lib import add_newdoc File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/lib/init.py", line 152, in from type_check import * File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/lib/type_check.py", line 8, in import numpy.core.numeric as _nx File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/core/init.py", line 5, in import multiarray ImportError: dlopen(/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/core/multiarray.so, 2): no suitable image found. Did find: /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/core/multiarray.so: mach-o, but wrong architecture