ParaView/EnvironmentSetup: Difference between revisions
Andy.bauer (talk | contribs) (→Linux) |
(Hopefully improve google search results where someone searches for those errors.) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Before starting == | |||
Ensure that you have performed the steps from the "Getting Started" section of [[ParaView/Python Scripting]]. More concretely, you must have setup the environment variable <tt>PYTHONPATH</tt> to the indicated initial value to avoid some missing packages when using [[Python Programmable Filter|Programmable Filters]]. | |||
==Linux== | ==Linux== | ||
You must add this to your .bashrc to run anything in a ProgrammableFilter. | You must add this to your .bashrc to run anything in a ProgrammableFilter. | ||
Line 7: | Line 11: | ||
Note that for older versions of ParaView the first line may need to be replaced by: | Note that for older versions of ParaView the first line may need to be replaced by: | ||
export PYTHONPATH=$PYTHONPATH:/home/doriad/bin/ParaView/Utilities/VTKPythonWrapping | export PYTHONPATH=$PYTHONPATH:/home/doriad/bin/ParaView/Utilities/VTKPythonWrapping | ||
==Windows== | |||
If you get one of this errors: | |||
ImportError: No module named paraview | |||
ImportError: No module named vtkCommonCorePython | |||
Ensure that you have these three folders in your <tt>PYTHONPATH</tt> environment variable: | |||
C:\ParaView-v4.2.0-build\lib | |||
C:\ParaView-v4.2.0-build\lib\site-packages | |||
C:\ParaView-v4.2.0-build\bin | |||
Depending on your build, the folder '' C:\ParaView-v4.2.0-build\lib '' may not contain the *.libs files, in those cases the folder you need to add is the one corresponding to the configuration you used when building ParaView: | |||
C:\ParaView-v4.2.0-build\lib\'''Release''' | |||
or | |||
C:\ParaView-v4.2.0-build\lib\'''Debug''' |
Latest revision as of 21:15, 30 December 2014
Before starting
Ensure that you have performed the steps from the "Getting Started" section of ParaView/Python Scripting. More concretely, you must have setup the environment variable PYTHONPATH to the indicated initial value to avoid some missing packages when using Programmable Filters.
Linux
You must add this to your .bashrc to run anything in a ProgrammableFilter.
export PYTHONPATH=$PYTHONPATH:/home/doriad/bin/ParaView/Utilities/VTKPythonWrapping/site-packages #fixes "no module named paraview" export PYTHONPATH=$PYTHONPATH:/home/doriad/bin/ParaView/bin #fixes "ImportError: No module named libvtkCommonPython"
Note that for older versions of ParaView the first line may need to be replaced by:
export PYTHONPATH=$PYTHONPATH:/home/doriad/bin/ParaView/Utilities/VTKPythonWrapping
Windows
If you get one of this errors:
ImportError: No module named paraview ImportError: No module named vtkCommonCorePython
Ensure that you have these three folders in your PYTHONPATH environment variable:
C:\ParaView-v4.2.0-build\lib C:\ParaView-v4.2.0-build\lib\site-packages C:\ParaView-v4.2.0-build\bin
Depending on your build, the folder C:\ParaView-v4.2.0-build\lib may not contain the *.libs files, in those cases the folder you need to add is the one corresponding to the configuration you used when building ParaView:
C:\ParaView-v4.2.0-build\lib\Release
or
C:\ParaView-v4.2.0-build\lib\Debug