How to install numpy, mpi4py, chainer, tensorflow, cupy etc. using python/3.6.5

If you want to install numpy, mpi4py, chainer etc. using python/3.6.5, do as follows.

$ module purge
$ module load python/3.6.5
$ module load intel cuda openmpi
$ python3 -m pip install --user python_modules

If you want to specify the version, do:

$ python3 -m pip install --user python_modules==version


※When installing a module that uses GPU like cupy etc., please keep computing nodes with qrsh command. before you install it. 

※For CuPy,  it is possible to install faster by specifying corresponding cuda version such as cupy-cuda102 when invoking pip install.

How to install numpy linking intel MKL

Copy to ~/.numpy-site.cfg and edit the item of [mkl] as follows. 

library_dirs = /apps/t3/sles12sp2/isv/intel/compilers_and_libraries_2018.1.163/linux/mkl/lib/intel64
include_dirs = /apps/t3/sles12sp2/isv/intel/compilers_and_libraries_2018.1.163/linux/mkl/include
mkl_libs = mkl_rt

Then do the following

$ module load intel python/3.6.5
$ python3 -m pip install --no-binary :all: --user numpy