When numpy is installed, it is build against (or linked with) system’s linear algebra packages. Numpy by default will build against Atlas if it is installed.
For details, see site.cfg
To display which linear algebra package numpy uses, run
import numpy as np
np.show_config()
Also see system_info.py.
If numpy installed by conda, it likely uses MKL. See conda’s documentation on MKL optimization. Results of np.show_config()
on my laptop,
blas_mkl_info:
libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
library_dirs = ['/Users/neurite/Applications/miniconda3/envs/temp/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/Users/neurite/Applications/miniconda3/envs/temp/include']
blas_opt_info:
libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
library_dirs = ['/Users/neurite/Applications/miniconda3/envs/temp/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/Users/neurite/Applications/miniconda3/envs/temp/include']
lapack_mkl_info:
libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
library_dirs = ['/Users/neurite/Applications/miniconda3/envs/temp/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/Users/neurite/Applications/miniconda3/envs/temp/include']
lapack_opt_info:
libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
library_dirs = ['/Users/neurite/Applications/miniconda3/envs/temp/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/Users/neurite/Applications/miniconda3/envs/temp/include']
A few exceptions include jupyter, nltk, plotly
Install and run Python via miniconda. See the note on installing miniconda. Alternatively, anaconda bundles in more packages. I prefer miniconda and handpick packages for individual conda environment.
Develop
I/O
Cloud
conda install awscli -c conda-forge
The numpy family
Data I/O
Visualization
Machine learning
Natural language processing
Web scraping, HTML/XML parsing
Miscellaneous
All the packages above, unless noted otherwise, can be installed via conda install <package-name>
.
It’s worth noting the SciPy Stack which is now obsolete. But even today a typical Python ML/DL environment includes jupyter, numpy, scipy, pandas, matplotlib, seaborn. Other packages such as scikit-learn, or tensorflow, or mxnet, are added on top of them.
conda install pylint pytest
conda install requests sqlite
conda install jupyter
conda install numpy scipy