我安装了ParaView 5.7并用它记录一个python脚本。在Windows 10中,我可以打开pvpython shell并执行代码,但在Mac中我找不到此pvpython shell。
我尝试在终端python my_script.py
中执行脚本并得到错误
from paraview.simple import *
ImportError: No module named paraview.simple
我的sys.path
是
'/Library/Python/2.7/site-packages/pip-19.3.1-py2.7.egg',
'/Users/jane/Desktop',
'/home/jane/Code/Kitware/build/VTK/lib/python2.7/site-packages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
'/Library/Python/2.7/site-packages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC'
]
我还应该添加到PYTHONPATH
?
在Mac上,pvpython
安装在/Applications/ParaView-5.7.0.app/Contents/bin/pvpython
中