The two scientific computing packages under Python SciPy and numpy are more dependent, and the installation process is more complex.
Individual installation packages:
scipy-0.19.0 Download: https://github.com/scipy/scipy/releases
numpy-1.9.0 Download: HTTPS://SOURCEFORGE.NET/PROJECTS/NUMPY/FILES/NUMPY/1.9.0/NUMPY-1.9.0.ZIP/DOWNLOAD?USE_MIRROR=NCHC
nose-1.1.2 Download: https://pypi.python.org/packages/38/96/ 7aa1c2583ddec558a230175d6aeddba796cde7191852bf3e6eb3cfb873e1/nose-1.1.2.tar.gz
lapack-3.7.0 Download: www.netlib.org/lapack/lapack-3.7.0.tgz
atlas-0.27.0 Download: https://pypi.python.org/pypi/atlas/0.27.0
Dependencies: The installation of scipy relies on NumPy, Lapack, and Atlas (both of which are linear algebra toolkits, while NumPy and scipy test programs are run on nose, so the entire installation process must be executed sequentially, otherwise it cannot be executed.
Installation steps:
1, installation nose
Unzip the nose installation file, enter the nose directory, run the setup.py directly:
[Plain]View PlainCopy
- TAR-ZXVF nose-1.2.1.tar.gz
- CD nose-1.2.1
- Python setup.py Install
Note : The python command might be to start python2, and if you need to run these libraries in a python3 environment, you need to install Python3 first.
When installing these libraries, use the Python3 command: Python3 setup.py install. (This is not required if the default Python starts Python3)
2, installation Lapack
Since the latest version of ATLAS can be compiled directly with the Lapack installation zip file, it is not necessary to install lapack if it is used only under Python. Just download the compressed file: Lapack-3.7.0.tgz can be.
3. Install Atlas
[Plain]View PlainCopy
- TAR-ZXVF atlas-0.27.0.tar.gz
- CD atlas-0.27.0
- Python setup.py Install
4, Installation NumPy
Recommended use of the source code installation: After download unzip, go to the folder, directly run the installation files
[Plain]View PlainCopy
- Unzip Numpy-1.9.0.zip
- CD numpy-1.9.0
- Python setup.py Install
Wait for the installation to complete.
Note: During the installation process, you may be prompted for missing Python-dev or python-devel to install Python-devel in the CentOS system.
To test whether the installation was successful:
5, Installation SciPy
TAR-ZXVF scipy-0.19.0.tar.gz
CD scipy-0.19.0
CP lapack-3.7.0.tgz
Python setup.py Install
Wait for the installation to complete.
Note : The scipy installation relies on lapack, so at the time of installation, Lapack's compressed package is copied to the scipy-0.19.0 directory, and lapack-3.7.0.tgz can be decompressed if needed.
You can also execute the following directives:
Yum install lapack lapack-devel Blas Blas-devel
Note : If, after installing a library, you enter the Python environment and import the library through import without exiting the installation folder, you will be prompted with the following:
"Importerror:error importing numpy:you should not try-to-import numpy > from its source directory; Please exit the NumPy source tree, and > relaunch your Python intepreter from there.
You should exit the installation folder at this time before entering the Python Environment import library.
Installing NumPy and scipy under Linux