CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[Other] How to install numpy on CentOS/RHEL 6.x?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2018, 08:15
Default How to install numpy on CentOS/RHEL 6.x?
  #1
New Member
 
Vania
Join Date: Dec 2016
Posts: 13
Rep Power: 9
VLima is on a distinguished road
Dear all,

I have a problem using Python within OpenFOAM.

It is installed within OpenFOAM (verified via opening terminal and typing "python" - version 2.6.6 btw) but does not recognize the packages numpy, etc :

bash-4.1$ python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy



So the problem arises when I run some case that has to run a Python script :

bash-4.1$ bash runCasePiston
blockMesh meshing...
Preparing 0 folder...
Setting the fields...
Creating piston wavemaker movement...
Traceback (most recent call last):
File "pistonWaveGen.py", line 3, in <module>
import numpy as np
ImportError: No module named numpy



I manage to run the python script outside OpenFOAM but this is not a practical nor wishful solution.

I do not want to mess much with my Python installations, as they are bounded to work with other codes.

So my question is how to solve this issue, concerning the Python packages recognition, within OpenFOAM?

Hope I was clear.

Looking forward for your help!

Thank you in advance.
VLima is offline   Reply With Quote

Old   May 31, 2018, 08:30
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: You will still need to install numpy, but you can choose to either install it at the system-level or install it as a normal user: https://superuser.com/questions/4656...os-6-2-64-bit/

Due to numpy being a fairly standard Python package, I believe you can install it without interfering with other Python packages and current installation.
__________________
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.org] Install OpenFOAM without admin right OpenFoamlove OpenFOAM Installation 1 December 31, 2017 11:45
error make SU2 4.0.1 Heathckliff SU2 Installation 2 November 9, 2015 05:48
[swak4Foam] Install swak4Foam on OpenFOAM1.7.1 on Ubuntu 13.04 kobayashi OpenFOAM Community Contributions 2 January 5, 2014 17:33
unable to install openfoam 1.7 using apt-get maazhmd OpenFOAM Installation 7 July 24, 2011 11:18
How to Install OpenFOAM on 64 Ubuntu 9.04 hansel OpenFOAM Installation 62 March 19, 2010 14:43


All times are GMT -4. The time now is 05:50.