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

SciPy

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By copeland

Reply
 
LinkBack Thread Tools Display Modes
Old   January 30, 2013, 12:08
Default SciPy
  #1
New Member
 
dtucker's Avatar
 
David Tucker
Join Date: Jan 2013
Posts: 16
Rep Power: 4
dtucker is on a distinguished road
I don't believe this has been answered elsewhere; I did my best to check prior to posting. NumPy and SciPy are extensively noted as required for the running of some of the configurations.

I don't seem to have any problem with installing NumPy, but I am getting the following error when trying to run tutorial 8 (rotating NACA0012), which leads me to believe I made an error when installing/compiling SciPy:
> python shape_optimization.py -f rot_NACA0012.cfg

Traceback (most recent call last):
File "shape_optimization.py", line 26, in <module>
from scipy.optimize import fmin_bfgs
ImportError: No module named scipy.optimize
>

I placed the SciPy folder in my home directory...not sure if it is supposed to be located somewhere else. I am definitely new to the Cygwin environment; so no hint is too trivial!

Thanks
dtucker is offline   Reply With Quote

Old   January 30, 2013, 12:18
Default ...follow-up
  #2
New Member
 
dtucker's Avatar
 
David Tucker
Join Date: Jan 2013
Posts: 16
Rep Power: 4
dtucker is on a distinguished road
...just tried to run "import scipy" within python with the response:
ImportError: No module named scipy
I'm sure there is a neat and tidy explanation out there how to finish building scipy, but I haven't found one dumbed-down enough for the likes of me!

Again; any help/direction is appreciated.
dtucker is offline   Reply With Quote

Old   January 31, 2013, 01:52
Default
  #3
Member
 
Sean R. Copeland
Join Date: Jan 2013
Posts: 40
Rep Power: 4
copeland is on a distinguished road
Hey David,

Thanks for checking out SU2, sorry to hear you've been having some troubles with the initial setup.

Python has a set of standard directories that it searches when looking for module files to include (it has a path environment variable that is completely analogous to your $PATH environment variable in your bash shell). Numpy and scipy are examples of such additional modules. Since the user has more freedom to select the installation directories for Numpy and Scipy, sometimes you can inadvertently place these modules in a location that python doesn't know to look. You can augment the python search path by specifying the additional directories to check using the $PYTHONPATH environment variable in your .bashrc or .bash_profile files (or appropriate shell configuration files if you use tcsh).

I've included an example from my .bashrc file to link to Numpy below:

# Set location of numpy and add to the PYTHONPATH
export PYTHONPATH=/home/srcopela/numpy-1.6.2/lib/python2.7/site-packages:$PYTHONPATH

Hope this helps, and please write back if you're still having troubles.


Regards,
Sean
dtucker likes this.
copeland is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paths confusion in python scripts praveen SU2 Installation 9 March 3, 2013 08:51
Postprocessing using pythonFlu + Matplotlib +Scipy francois OpenFOAM Post-Processing 2 June 21, 2011 11:26


All times are GMT -4. The time now is 09:14.