[Paraview] make install breaks pvpython on MacOSX

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Aug 26 08:09:10 EDT 2013


Axel,

This is a known issue. I'll track the issue down and let you know.

Utkarsh

On Fri, Aug 16, 2013 at 9:45 AM, Loewe, Axel (IBT) <axel.loewe at kit.edu> wrote:
> 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
>
> _______________________________________________
> 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 ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list