How to install scipy without mkl
Asked Answered
D

1

8

Now I am working on Python 3.5 and trying to deploy my web application with Heroku. When I try to publish it online, Numpy+mkl is not compatible to Heroku and it can find only normal version of Numpy. So I uninstall Numpy+mkl and install normal Numpy. As Scipy installation requires numpy with mkl, I am now in trouble. I try to find Scipy wheel file but on Scipy website, all versions require numpy+mkl.

how can I find the Scipy without requirement of numpy+ mkl?

Didactic answered 13/7, 2016 at 7:43 Comment(1)
I found the solution. Read documentation for conda requirements. And add nomkl above all the libraries requiring mkl in the txt file of conda requirementsDidactic
M
6

In the comment above, @alrozac-S is referring to setting up a conda environment without MKL. From the Anaconda blog:

Finally, in case you do not need or want MKL, it is possible to opt out of installing MKL. We provide this option on Linux and OS X, because MKL is a large package (roughly 100MB), and for many tasks it is not necessary. The alternatives to MKL are OpenBLAS (for Linux), and the native Accelerate Framework (for OS X). To use the non-MKL versions of packages on Linux or OS X, first install Miniconda, and then execute:

conda install nomkl

This effectively adds the nomkl feature, which makes conda prefer non-MKL versions of packages in all cases. For example, executing:

conda install scipy

If you have installed Anaconda, you can create a new environment that will install packages from the PyData stack without MKL using:

conda create -n pynomkl python nomkl

Then install the packages as usual

conda install -n pynomkl numpy pandas scipy scikit-learn
Marchioness answered 11/12, 2017 at 18:21 Comment(3)
Good in theory, but it failed for me today. I wonder what's wrong. I have nomkl in my created env but when I install fastai and pytorch I still see on conda confirmation dialog: mkl: 2019.0-118, and it is 200MB. What is wrong, is it one of the dependent packages that sadly still links to MKL somewhere?Ponceau
Blog link no longer works, but the same info is available in the conda documentation.Olfactory
Also check this thread: github.com/conda-forge/numpy-feedstock/issues/84Olfactory

© 2022 - 2024 — McMap. All rights reserved.