CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 Installation (https://www.cfd-online.com/Forums/su2-installation/)
-   -   SciPy (https://www.cfd-online.com/Forums/su2-installation/112533-scipy.html)

dtucker January 30, 2013 11:08

SciPy
 
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 January 30, 2013 11:18

...follow-up
 
...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.

copeland January 31, 2013 00:52

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


All times are GMT -4. The time now is 12:48.