Install scipy on Linux without internet connection

It is possible to copy the source code, but assuming that you cannot use installation tools that are premised on connecting to the Internet, install from the source.

$ python
Python 2.7.6 (default, May  1 2014, 11:34:02) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2

As you can see, the version of python is 2.7.6.

numpy First, install from numpy.

Will be downloaded.

$ tar xvzf numpy-1.8.1.tar.gz
$ cd numpy-1.8.1/
$ python setup.py build --fcompiler=gnu95
# python setup.py install

It seems that gfortran was specified as the Fortran compiler. The last installation command was done with super-user privileges.

$ python
>>> import numpy

If there is no error, there is no problem.

Cython It seems that Cython is needed, so install it.

Download and copy.

$ unzip Cython-0.20.1.zip
$ cd Cython-0.20.1/
# python setup.py install

Again, the last command was done with super-user privileges.

lapack It seems that lapack is also needed, so install it.

Edit some in the make.inc file.

FORTRAN= gfortran -m64 -fPIC

Here, -m64 is required to create 64-bit, and -fPIC is required to create a shared library.

$ make

Finally,

# cp liblapack.a libtmglib.a /usr/local/lib/

Install liblapack.a and libtmglib.a with a manual copy.

scipy Install with the following command.

# python setup.py install

If there are no errors as shown below, you can assume that the installation was successful.

>>> import scipy

ImportError: libblas.so: cannot open shared object file: No such file or directory

>>> import scipy.optimize

If you get the above error when you try, it is probably because libblas.so cannot be found in the library path.

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Add the path to libblas.so to the value of LD_LIBRARY_PATH like this.

matplotlib Install as follows.

$ tar xvzf matplotlib-1.3.1.tar.gz
$ cd matplotlib-1.3.1/
$ cp ../distribute-0.6.28.tar.gz ./
$ python setup.py build
# python setup.py install

It seems to depend on distribute-0.6.28.tar.gz, so you have to put it in the matplotlib-1.3.1 / directory.

In addition, nose, dateutil, pyparsing, six, tornado, backports, etc. are required as dependencies. These can be done as long as the dependencies are resolved.

# python setup.py install

I was able to install it with.

ipython

Download ipython-1.2.1.tar.gz, unzip and unpack it,

# python setup.py install

It was OK.

Recommended Posts

Install scipy on Linux without internet connection
Install Minecraft on Arch Linux
Install Linux on your Chromebox
[Node] [npm] Install npm packeage on MacOS / Linux without sudo
Install the JDK on Linux
Install tomcat 5.5 on Amazon Linux.
Install Homebrew on Amazon Linux 2
Install strongSwan 5.9.1 on Amazon Linux 2
Install Python Pillow on Amazon Linux
Install oracle java8 on amazon linux2
Install CUDA on Linux Mint Mate 20
Install Arch Linux on DeskMini A300
Install Scipy on Mac OS Sierra
[Linux] Install Python 3 without administrator privileges
How to install VMware-Tools on Linux
Install pyenv on EC2 (Amazon Linux)
[Note] Install Imagick on Amazon Linux2
Install PyStan on Windows without Anaconda
Install Scipy
Installation from python, numpy, scipy sources without root privileges on Linux
How to install aws-session-manager-plugin on Manajro Linux
Install wsl2 and master linux on windows
Use Numpy, Scipy, scikit-learn on Amazon Linux
Install and launch k3s on Manjaro Linux
Install and Configure TigerVNC server on Linux
scipy stumbles with pip install on python 2.7.8
Install CVXOPT, NumPy, SciPy on Travis CI
How to install packages on Alpine Linux
5 reasons to install Linux on your laptop.
How to install Anisble on Amazon Linux 2
Dockerfile: Install Docker on your Linux server
Install Mecab on Linux (CentOS) with brew
Run Keycloak on Amazon Linux 2 without Docker
How to install php7.4 on Linux (Ubuntu)
Install rJava on Linux in R3.6 environment.
Until you install Arch Linux on VMware
Install Python 3.8, Pip 3.8 on EC2 (Amazon Linux 2)
Linux "Install on / dev / sda" error resolution
Install debian on linux on Arrows tab Q584 / H
Install and run Python3.5 + NumPy + SciPy on Windows 10
Install Anydesk Linux version on Chromebook [Result NG]
[Note] Install wxPython 3.x on Linux Mint (Ubuntu)
How to install Camunda Modeler on Manjaro Linux
Install PHP 7 series on Amazon Linux 2 with Amazon Linux Extras
Run Kali Linux on Windows with GUI (without VirtualBox)
Install Grub on USB memory (UEFI) ~ Boot Linux from grub on USB memory ~
Very easy to install SciPy on Mac OS X
How to install Linux on a 32bit UEFI PC
Compile and install MySQL-python for python2.7 on amazon linux
Install Docker on Arch Linux and run it remotely
[AWS EC2] How to install Maven on Amazon Linux 2
How to install git on Linux such as EC2
Install mecab on Marvericks
Daemonizing processes on Linux
Install TensorFlow on Ubuntu
Install python on WSL
Install pyenv on mac
Install pip on Mavericks
Install Python on Pidora.
Install mongodb on termux
Install Scrapy on python3