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