1

I'm getting stuck on installing scipy on ec2. So I was trying to get the file to download, and it shows the following errors. What am I missing? Thanks so much! Really newbie here to working with remote environments.

$ curl http://downloads.sourceforge.net/project/scipy/scipy/0.11.0/scipy-0.11.0.zip?r=&ts=1364951046&use_mirror=iweb
[1] 2355
-bash: amp: command not found
[2] 2357
-bash: amp: command not found
waitingkuo
  • 89,478
  • 28
  • 112
  • 118
msunbot
  • 1,871
  • 4
  • 16
  • 16

1 Answers1

5

You can installed it via pip

  1. sudo apt-get install -y python-pip

  2. sudo pip install numpy #scipy depends on numpy

  3. sudo pip install scipy

P.S. I recommend you install step 2 and 3 on virtualenv

EDIT

Seems you should install Fortune before step 3. You can take a look at here

EDIT

Finally, I launch a new EC2 instance and installed it for you:

  1. sudo apt-get install -y python-pip

  2. sudo pip install numpy

  3. sudo apt-get install gfortran

  4. sudo apt-get install libblas-dev

  5. sudo apt-get install liblapack-dev

  6. sudo apt-get install g++

  7. sudo pip install scipy

Hope these might work.

Community
  • 1
  • 1
waitingkuo
  • 89,478
  • 28
  • 112
  • 118
  • Hi @waitingkuo, thank you for the answer. I tried the steps in the link you mention in the Edit part, and ran into this problem where g77 / ifort / gfortran all show: Command not found. Is there other ways to compile the Fortran file? – msunbot Apr 03 '13 at 07:16
  • Have added the steps to install gfortran and its modules. – waitingkuo Apr 03 '13 at 07:38
  • Thank you so much @waitingkuo -So I tried sudo apt-get install gfortran, and it returned command not found. So I tried sudo yum install gfortran and it returned 'No package gfortran possible'. Error: Nothing to do' – msunbot Apr 03 '13 at 07:58
  • 1
    Which linux distribution are you using? – waitingkuo Apr 03 '13 at 07:59
  • 3
    Try `sudo yum install gcc-gfortran` instead. – waitingkuo Apr 03 '13 at 08:04
  • Thanks! So i successfully installed gcc-gfortran. Now I tried sudo pip install scipy, it show here "Command /home/ec2-user/env/dir/bin/python2.6 -c "import setuptools;__file__='/home/ec2-user/env/dir/build/scipy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-WqmkNL-record/install-record.txt --install-headers /home/ec2-user/env/dir/include/site/python2.6 failed with error code 1 in /home/ec2-user/env/dir/build/scipy" – msunbot Apr 03 '13 at 08:49
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/27463/discussion-between-msunbot-and-waitingkuo) – msunbot Apr 03 '13 at 08:52
  • On my EC2 instance I had to run: sudo apt-get install python-dev – j.a.gartner May 12 '15 at 21:12