Question

I am trying to install OpenMDAO, which is an open source framework that uses python. So before I get to it, it needs 3 packages:

  1. Fortran Compiler
  2. NumPY
  3. ScyPy

Which I did install using homebrew:

brew install gfortran
sudo easy_install-2.6 pip
sudo pip-2.6 install numpy
sudo pip-2.6 install scipy

Now, to install OpenMDAO, I'm supposed to be in the OpenMDAO folder and at that level I should run this script:

python go-openmdao-dev.py

But I keep getting this error:

ERROR: the following prerequisites could not be imported: ['scipy'].

So I was talking to the people at OpenMDAO, and it seems that I need to use is python2.6 - although I'm not certain, so my guess is that all the packages I installed are for python 2.7 which I downloaded since it was recommended in the python website.

The one that comes with Mac was not. So when I type in terminal the following:

python2.6

It actually runs that version. So at this point I don't know if I have to go run the script in python 2.6, but if so, I have no idea how to do it. I tried doing this and it did not work:

Screenshot of the problem

If anyone is familiar with the environment or just with python itself and has any suggestions, I'll really appreciate it.

Was it helpful?

Solution 2

I had the same problem after downloading scipy from a .dmg. I uninstalled, and then reinstalled from source: http://sourceforge.net/projects/scipy/files/scipy/0.12.0/ and then the openmdao installer recognized scipy.

This may be useful (from INSTALL.txt in scipy-0.12.0.tar.gz):

To test SciPy after installation (highly recommended), execute in Python

>>> import scipy
>>> scipy.test()

To run the full test suite use

>>> scipy.test('full')

Please note that you must have version 0.10 or later of the 'nose' test framework installed in order to run the tests. More information about nose is available on the website__.

__ http://somethingaboutorange.com/mrl/projects/nose/

OTHER TIPS

This question was answered on the OpenMDAO support forum: http://openmdao.org/forum/questions/744/error-the-following-prerequisites-could-not-be-imported-scipy

The solution was to install scipy and numpy for python2.7. The original poster first installed them for python2.6, but then ran the go-openmdao.py script with python2.7. Once all the pre-reqs were installed for 2.7, it worked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top