[Paraview] make install breaks pvpython on MacOSX

Loewe, Axel (IBT) axel.loewe at kit.edu
Fri Aug 16 09:45:59 EDT 2013


Hi everyone,

I built ParaView locally from the current source tree (4.0.1) with PARAVIEW_ENABLE_PYTHON set to ON in CMake. When calling pvpython in the build directory, importing paraview.simple works fine. However, this is not the case after running make install and calling pvpython from the paraview.app/Contents/bin directory.

>>> from paraview import simple
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: No module named paraview

I can fix this by manually setting the environment variable PYTHONPATH to include paraview.app/Contents/Python and paraview.app/Contents/Libraries
However, http://paraview.org/Wiki/ParaView/Python_Scripting#Getting_Started states that setting PYTHONPATH manually should not be required when using pvpython which is indeed the case for the prebuilt binary package.

Did I miss to set a CMake flag appropriately? Everything a search related to this issue brought up was setting PYTHONPATH manually which I feel can't be the only solution.

The output of sys.path from pvpython in the build directory and in the .app package produced by make install is as follows:

ParaView-bin2/bin/pvpython:
['', '/Volumes/pommard/Benutzer/al128/usr/build/ParaView-bin2/lib/site-packages', '/Volumes/pommard/Benutzer/al128/usr/build/ParaView-bin2/lib', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Volumes/pommard/Benutzer/al128/Library/Python/2.7/lib/python/site-packages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyObjC', '/Library/Python/2.7/site-packages']

Applications/paraview.app/Contents/bin/pvpython:
['', '/Volumes/pommard/Benutzer/al128/usr/lib', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Volumes/pommard/Benutzer/al128/Library/Python/2.7/lib/python/site-packages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyObjC', '/Library/Python/2.7/site-packages']

To me it looks like pvpython in the .app package does not append paraview.app/Contents/Python and paraview.app/Contents/Libraries to the path while pvpython in the build directory appends to corresponding folders
ParaView-bin2/lib/site-packages and ParaView-bin2/lib for some reason.

Any help regarding a solution without setting PYTHONPATH manually is greatly appreciated!

Best,

_____________________________________________
Karlsruhe Institute of Technology (KIT)
Institute of Biomedical Engineering

Axel Loewe, M.Sc.
Scientific Staff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130816/69194013/attachment.htm>


More information about the ParaView mailing list