Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ numpy and SciPy installation under Python for scientific computing package     - Let the terminal under Mac OS X as like Linux has displayed a variety of colors (Linux)

- Kafka + Log4j log implement centralized management (Server)

- Python context managers (Programming)

- Computer security protection remove local and remote system log files (Linux)

- Linux security settings Notes (Linux)

- Java development environment to build under Ubuntu (Linux)

- Hadoop - Task Scheduling System Comparison (Server)

- MySQL optimization of the relevant Group By (Database)

- 10 Nginx safety tips (Linux)

- Build RubyMine + Ruby On Rails + MySQL development environment under Windows (Server)

- HBase table data processing tab (Database)

- Android Custom View step (Programming)

- CentOS install Java 1.8 (Linux)

- Hibernate Search and Lucene quick introduction (Linux)

- Two network security scanning tools under ubuntu (Linux)

- How to migrate MySQL to MariaDB under linux (Database)

- Linux Live CD lets your PC is no longer secure (Linux)

- RM Environment Database RMAN Backup Strategy Formulation (Database)

- To setup NOTRACK and TRACK of conntrack in iptables (Linux)

- Growth since Oracle set the table space (Database)

 
         
  numpy and SciPy installation under Python for scientific computing package
     
  Add Date : 2018-11-21      
         
         
         
  Most Python installation kit is very simple, just need to execute "python setup.py install" command. However, since these two numpy SciPy and scientific computing package dependencies is more, the installation process is more complicated. Online tutorials more confusing, but just do not use basic. After careful study of each bag README and INSTALL, finally installed successfully. Now recorded as follows.

System environment:

OS: RedHat Linux 5

Python version: Python2.7.3

gcc Version: 4.1.2

Each package version:

scipy-0.11.0

numpy-1.6.2

nose-1.2.1

lapack-3.4.2

atlas-3.10.0

Dependencies: scipy installation relies on numpy, lapack, atlas (the latter two are linear algebra toolkit clear themselves of google ...) while running sci numpy and testing procedures are also dependent on the nose, Thus, the entire installation must be performed according to the order, otherwise it is impossible to perform forever.

installation steps:

1, the installation nose

The installation is relatively simple, unzip the installation file nose, nose into the directory, you can run directly setup.py:

tar -zxvf nose-1.2.1.tar.gz

cd nose-1.2.1

python setup.py install

2, the installation lapack

Since the latest version of the ATLAS can be integrated directly lapack compressed installation files are compiled, so if you only use in python, you can not install lapack. Just download the zip file: lapack-3.4.2.tgz can.

3, installation ATLAS

The installation of the main configuration options, including 64-bit library files configured, location-independent and shared libraries. Detailed configuration instructions in the installation package atlas pdf file doc / under the. Available.

The following are my installation process:

tar -jxvf atlas3.10.0.tar.bz2

cd ATLAS

mkdir obj64

../configure -b 64 -Fa alg -fPIC installation path -shared --prefix = / configuration atlas of / atlas --with-netlib-lapack-tarfile = / lapack installation compressed file directory /lapack-3.4.2 .tgz

(Note: This configuration is very long, the Core i7 processing, about one hour or so)

make

(Here are some of the inspection process to ensure that there is no problem after re-installation)

make check

make time

make install

So far, atlas installation is complete. But we want to record the compilation process used fortran compiler type, when the information in the following installation numpy and scipy of use. Or in the catalog obj64 / under execution

fgrep "F77 =" Make.inc
We can see the F77 = gfortran
Write down this compiler type gfortran.

4. Install numpy

numpy and the installation process scipy be used to explicitly specify the type of fortran compiler, but also coincides atlas (herein, namely: gfortran) previously compiled, it is very important, otherwise it will be wrong a lot of features.

First, the configuration file location site.cfg numpy directory, specify atlas libraries:

tar -zxvf numpy-1.6.2.tar.gz

cd numpy-1.6.2

cp site.cfg.example site.cfg

vim site.cfg

Arranged in the following format:

[DEFAULT]
library_dirs = / usr / local / lib: / install directory atlas of / atlas / lib
include_dirs = / usr / local / include: / atlas installation directory / include

[Blas_opt]
libraries = f77blas, cblas, atlas

[Lapack_opt]
libraries = lapack, f77blas, cblas, atlas

[Amd]
amd_libs = amd
[Umfpack]
umfpack_libs = umfpack

Next, configure the required installation numpy Fortran compiler type:

If previously obtained Fortran compiler is gfortran, then execute:

 python setup.py build --fcompiler = gnu95

If previously obtained g77 Fortran compiler is then performed:

 python setup.py build --fcompiler = gnu

And then do

python setup.py install

The installation is complete

5, the installation scipy

And install numpy similar:

tar -zxvf scipy-0.11.0.tar.gz

cd scipy-0.11.0

vim site.cfg

Arranged in the following format:

[DEFAULT]
library_dirs = / usr / local / lib: / install directory atlas of / atlas / lib
include_dirs = / usr / local / include: / atlas installation directory / include

[Blas_opt]
libraries = f77blas, cblas, atlas

[Lapack_opt]
libraries = lapack, f77blas, cblas, atlas

[Amd]
amd_libs = amd
[Umfpack]
umfpack_libs = umfpack

Next, configure the required installation numpy Fortran compiler type:

If previously obtained Fortran compiler is gfortran, then execute:

 python setup.py build --fcompiler = gnu95

If previously obtained g77 Fortran compiler is then performed:

 python setup.py build --fcompiler = gnu

And then do

python setup.py install

The installation is complete

You can then perform the appropriate test program in python:

python

>>> Import nose

>>> Import numpy

>>> Import scipy

>>> Numpy.test ( 'full')

wait. . . .

>>> Scipy.test ( 'full')

Here, the entire installation process is complete.
     
         
         
         
  More:      
 
- Definition Format Oracle basis of various statements (Database)
- Using the Linux folder wc statistics number of lines of code for all files (including subdirectories) (Linux)
- CentOS 6.5 Linux System Customization and Packaging Quick Implementation Script (Linux)
- To install the Git and Github under Ubuntu (Linux)
- Some problems and countermeasures Linux system calls exist (Linux)
- Memcache explain in detail (Server)
- Timeout control related to Python threads and a simple application (Programming)
- How to create a remote (Linux)
- How to Install Redis server on CentOS 7 (Server)
- IP configuration under Linux (Linux)
- Cobbler Add custom YUM source (Linux)
- Windows 8.1 and Ubuntu 14.04 dual system uninstall Ubuntu Tutorial (Linux)
- Wildcards and special symbols usage comments under Linux (Linux)
- 10 useful Linux command line tips (Linux)
- Linux excellent text editor (Markdown, LaTeX, MathJax) (Linux)
- Python in yield (Programming)
- The Samba service does not have permission to access (Server)
- Linux SSH commands (Linux)
- Linux (CentOS) SSH login without password authentication (Linux)
- ORA-12154: TNS: could not resolve the connect identifier specified solve (Database)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.