Search code examples
pythoncondaintel-mkl

What is the "nomkl" Python package used for?


I came across a script that installs the nomkl Python package:

conda install nomkl

What is the package nomkl? What it is used for? I tried to search it but could not find any description of it on the web.


Solution

  • The nomkl package is not a Python package, but instead what the Conda documentation refers to as a mutex metapackage. Its sole purpose is to toggle the use of different build variant configurations in an environment. In this specific case, it controls whether other packages (such as NumPy) use Intel's MKL library for their BLAS implementation or something else (e.g., OpenBLAS). That is, many other packages link against the BLAS library during build and so there are equivalent versions of packages like NumPy that reference MKL or OpenBLAS symbols.

    The Anaconda documentation on MKL Optimizations1 that @deceze dropped in the comments has details on nomkl specifically. However, since Anaconda 2023.03-0, there appears to have been an abandoning of nomkl in favor of directly including the specification blas=*=openblas in the anaconda package itself for the platforms, like osx-arm64, that are incompatible with MKL (see Release Notes). This is in effect identical, since this is the same constraint to nomkl defines.


    [1]: The original link has died and now points at a Wayback Machine copy.