MantisBT - ParaView
View Issue Details
0012584ParaView(No Category)public2011-09-09 12:112016-08-12 09:58
foret37 
Kitware Robot 
highminorhave not tried
closedmoved 
3.10.1 
 
TBD
incorrect functionality
0012584: PythonCalculator does not work on Mac OSX
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 "<string>", line 13
    retVal = area(inputs[0])mport
                                ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "/Users/partyd/Projects/ParaView-3.10/build/ParaView-build/Utilities/VTKPythonWrapping/site-packages/paraview/vtk/dataset_adapter.py", line 5, in <module>
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 "<console>", line 1, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/__init__.py", line 130, in <module>
    import add_newdocs
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/add_newdocs.py", line 9, in <module>
    from lib import add_newdoc
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/lib/__init__.py", line 152, in <module>
    from type_check import *
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/lib/type_check.py", line 8, in <module>
    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 <module>
    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
>>>
No tags attached.
Issue History
2011-09-09 12:11foret37New Issue
2016-07-25 14:58Cory QuammenNote Added: 0036565
2016-07-25 14:59Cory QuammenPrioritynormal => high
2016-08-12 09:58Kitware RobotNote Added: 0038069
2016-08-12 09:58Kitware RobotStatusbacklog => closed
2016-08-12 09:58Kitware RobotResolutionopen => moved
2016-08-12 09:58Kitware RobotAssigned To => Kitware Robot

Notes
(0036565)
Cory Quammen   
2016-07-25 14:58   
This is still a problem. When instantiating a Python Calculator in ParaView 5.1 on Mac OS X 10.11.4, I get the error message

/Applications/paraview.app/Contents/Python/numpy/random/__init__.py:99: RuntimeWarning: compiletime version 2.6 of module 'mtrand' does not match runtime version 2.7
  from .mtrand import *
(0038069)
Kitware Robot   
2016-08-12 09:58   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page.