Community
cancel
Showing results for 
Search instead for 
Did you mean: 
LFior2
Beginner
1,722 Views

how to install MKL enabled version of numpy/scipy for use in python3

Hello,

I am on an Asus notebbok with an i7 8550 processor, OS is Ubuntu 18.04.

I am trying to make my python3/numpy scripts go faster, by using MKL which supposedly will use many or all processor cores/threads.

I want to install intel-numpy or numpy-mkl (clarification needed!) in a pyenv/virtualenv environment with the `pip install` command. (Python version of that environment is 3.7.6)

 

I NEED CLEAR INSTRUCTIONS HOW TO PROCEED (which packages to install)

 

SOME DETAILS OF WHAT I DID:

  1. I have registered the intel repositories in `apt`, see the file /etc/apt/intelproducts.list in code section below
  2. I ran apt update and apt upgrade (succesfully)
  3. activated the mkl virtual environment (pyenv activate mkl), and checked the available packages with pip search mkl and pip search intel. There are many (see list below) and I am in doubt of what to install.
  4. then I tried the following pip install commands
  • pip install mkl (succeeded)
    • pip install intel-numpy (error message follows)
    • same with intel-scipy and numpy-mkl (same error message)
  • NB. I didn't need to pip uninstall numpy because mkl environment is brand new and no numpy is in there. Should I maybe install something else before the above commands?

 

Content of /etc/apt/sources.list.d/:

$ cat /etc/apt/sources.list.d/intelproducts.list # intelpython is disabled because not signed (apt upgrade gives error message) # deb https://apt.repos.intel.com/intelpython binary/ deb https://apt.repos.intel.com/mkl all main deb https://apt.repos.intel.com/ipp all main deb https://apt.repos.intel.com/tbb all main deb https://apt.repos.intel.com/daal all main deb https://apt.repos.intel.com/mpi all main

List of available pip packages:

$ pip search mkl mkl-fft (1.0.6) - MKL-based FFT transforms for NumPy arrays sparse-dot-mkl (0.4.1) - Intel MKL wrapper for sparse matrix multiplication mkl (2019.0) - Math library for Intel and compatible processors INSTALLED: 2019.0 (latest) mkl-random (1.0.1.1) - NumPy-based implementation of random number generation sampling using Intel (R) Math Kernel Library, mirroring numpy.random, but exposing all choices of sampling algorithms available in MKL. mxnet-mkl (1.6.0) - MXNet is an ultra-scalable deep learning framework. This version uses MKLDNN. mkl-devel (2018.0.3) - Math library for Intel and compatible processors cyanure-mkl (0.21.post3) - optimization toolbox for machine learning mkl-include (2019.0) - Math library for Intel and compatible processors numpy-mkl (1.10.2) - NumPy: array processing for numbers, strings, records, and objects. spams-mkl (2.6.1) - Python interface for SPAMS mkl-static (2018.0.0) - Math library for Intel and compatible processors cyanure-mkl-no-openmp (0.21.post3) - optimization toolbox for machine learning pyMKL (0.0.3) - Python wrapper of Intel MKL routines intel-numpy (1.15.1) - NumPy optimized with Intel(R) MKL library intel-scipy (1.1.0) - SciPy optimized with Intel(R) MKL library numkl (0.0.4) - A thin cython/python wrapper on some routines from Intel MKL tensorflow-kernels (0.1.2) - A package with Tensorflow (both CPU and GPU) implementation of most popular Kernels for kernels methods (SVM, MKL...).

pip install typical error message:

# python3 -m pip install intel-numpy ERROR: Could not find a version that satisfies the requirement intel-numpy (from versions: none) ERROR: No matching distribution found for intel-numpy

I am available and willing to contribute further detail into the matter.

Thanks.

Lorenzo

 

PS. Last but not least, I struggled to find an appropriate category to post this question (it probably would be MKL or Intel Python but there's no such category), please make one! 🙂

 

0 Kudos
1 Reply
Leonardo_C_Intel
Moderator
1,656 Views

Hello LFior2

 

Thank you for posting in the Intel Community.

 

I have found the following links that might help:

 

https://software.intel.com/content/www/us/en/develop/articles/installing-the-intel-distribution-for-...

https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-mkl-for-windows/...

 

but if you need farther assistance please

Reply