Monday 20 April 2015

Getting Scipy Working on Edison


How to get scipy working on Intel Edison?

Since most Machine Learning algorithms tend to use numpy and scipy, these are some of the main libraries that we need to be able to install on Intel Edison.

Before delving into the solution that worked for us, we will go through all different ways we tried and what problems we encountered at each step.

Approach 1: Try installing scipy using pip


1. We tried installing scipy the same way we installed numpy - 

pip install scipy

However, this failed as it required BLAS(Atlas) and gfortran. 

2. So we tried installing BLAS using the following commands:

2. tar jxvf ./atlas3.10.2.tar.bz2
4. mkdir ./ATLAS/build
5. cd ./ATLAS/build
6. ../configure --prefix=/usr/local --with-netlib-lapack-tarfile=/home/root/lapack-3.5.0.tgz --nof77 -v 2
7. make build
8. make install

However, even after 15 hours the installation didn’t complete. In case it completes for you, you can also try installing gfortran similarly. 

3. To install gfortran:

1. opkg install libgmp-dev libmpfr-dev libmpc-dev
2. wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.9.1/gcc-4.9.1.tar.bz2
3. tar jxvf ./gcc-4.9.1.tar.bz2
4. mkdir ./gcc-4.9.1/build
5. cd ./gcc-4.9.1/build
6. ../configure --prefix=/usr/local --enable-languages=c,c++,fortran --with-fpmath=sse
7. make
8. make install
However, many forum posts show that this also may not succeed because, more than 4GB disk space was required to build gfortran.
However, if you are successful in installing both you should now be able to run pip install scipy.

Approach 2: Try installing scipy using Miniconda


You can follow the process as shown in the following link -


However, we were unsucessful in getting scipy installed using this method.

Approach 3: Use a hack with Debian (Ubilinux) image instead of Yocto Linux. (This works!)


Refer to the next few blog posts to get familiarized with Ubilinux. 

1 comment:

  1. Miniconda Python on Intel Edison
    https://www.scivision.co/miniconda-python-on-intel-edison/

    ReplyDelete