|
[Sponsors] |
[OpenFOAM.org] set up python path for python in paraview compiled with openfoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 18, 2015, 07:22 |
set up python path for python in paraview compiled with openfoam
|
#1 |
Member
sean read
Join Date: Sep 2014
Location: Melbourne, Australia
Posts: 41
Rep Power: 12 |
I'm trying to get paraview working in external python environments such as idle, from what I've read it's simply a matter of adding a couple of bits to the python path.
I'm using linux mint 17.2. How do I locate the directories that need to be added to the python path? I am using OpenFOAM 2.4 |
|
October 24, 2015, 16:18 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer: If you are using the "paraviewopenfoam410" Debian package, it does not have Python support built into it
Edit: WAIT! I was wrong! This package already has it! The folder that needs to be added the PYTHON search path is this: Code:
/opt/paraviewopenfoam410/lib/paraview-4.1/site-packages Last edited by wyldckat; October 24, 2015 at 16:24. Reason: see "Edit:" |
|
October 24, 2015, 20:05 |
|
#3 |
Member
sean read
Join Date: Sep 2014
Location: Melbourne, Australia
Posts: 41
Rep Power: 12 |
hey Bruno,
Thanks for getting back to me, I didn't use the debian package - it wouldn't install on linux mint - I compiled myself, python is working fine in pvpython. Where would be the equivalent directory as compiled according to the instructions at http://www.openfoam.org/download/git.php? |
|
October 25, 2015, 08:52 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer: Mmm... that reminds me that we can use a more generic path that should give us the path in any installation of OpenFOAM with ParaView 4.1.0:
Code:
$ParaView_DIR/lib/paraview-4.1/site-packages Code:
echo $ParaView_DIR/lib/paraview-4.1/site-packages ls -l $ParaView_DIR/lib/paraview-4.1/site-packages Code:
$HOME/OpenFOAM/ThirdParty-2.4.x/platforms/linux64Gcc/ParaView-4.1.0/lib/paraview-4.1/site-packages |
|
October 25, 2015, 19:52 |
|
#5 |
Member
sean read
Join Date: Sep 2014
Location: Melbourne, Australia
Posts: 41
Rep Power: 12 |
thanks Bruno, That did the trick just fine!
|
|
October 25, 2015, 22:05 |
|
#6 |
Member
sean read
Join Date: Sep 2014
Location: Melbourne, Australia
Posts: 41
Rep Power: 12 |
wait, check that, so now I can import paraview no worries, but paraview.simple is still giving an error "No module named vtkCommonCorePython". I checked the site-packages/vtk directory, there is a binary file called vtkCommonCorePython.so, but no .py file. Does this mean that my lib is missing files?
Last edited by seanread; October 26, 2015 at 00:05. |
|
October 31, 2015, 08:28 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer: Googled:
Code:
ImportError: No module named vtkCommonCorePython Therefore, the solution is this: Code:
export PYTHONPATH=$ParaView_DIR/lib/paraview-4.1/site-packages:$ParaView_DIR/lib/paraview-4.1/site-packages/vtk |
|
October 31, 2015, 21:20 |
|
#8 |
Member
sean read
Join Date: Sep 2014
Location: Melbourne, Australia
Posts: 41
Rep Power: 12 |
Thanks Bruno, that got it working, I saw this thread but didn't think to change to the site-packages in the paraview path
|
|
Tags |
parafoam, python |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Using python script for automatic post processing of openFoam | vPaquet | ParaView | 12 | December 16, 2021 04:30 |
[OpenFOAM.org] Using OpenFOAM 2.3.0 from Deb pack in Ubuntu 14.04 + ParaView 5 from OpenFOAM 4.1 | ad2eb | OpenFOAM Installation | 12 | May 28, 2017 15:30 |
Ansys Licence Serve on Ubuntu 16.04 LTS | david.pasquale | ANSYS | 2 | January 20, 2017 12:52 |
New OpenFOAM Forum Structure | jola | OpenFOAM | 2 | October 19, 2011 07:55 |
Installation problems | shellbell1999 | OpenFOAM Installation | 9 | April 6, 2006 14:29 |