1

In anaconda the default numpy and scipy packages are backed by Intel MKL:

Is there a way to install them with pip?

Attention

The instructions by Intel on https://pypi.org/project/intel-numpy/ and https://pypi.org/project/intel-scipy/ doesn't work as the latest files there only support Python 3.9 and have non updated versions of scipy. This is the motivation for this question.

merv
  • 67,214
  • 13
  • 180
  • 245
Eric Johnson
  • 682
  • 1
  • 12

2 Answers2

1

Seems like you're stuck with what they build and release. If you want other versions built then post an Issue on the GitHub repo.

And no, you can't easily use Conda compiled packages with dynamic linking in non-Conda settings. Conda package builds use a very specialized dynamic linking setup (@rpaths everywhere + well-defined directory structure) that would be so much work to replicate manually that you should just use Conda.

merv
  • 67,214
  • 13
  • 180
  • 245
  • I see. What about Windows only? – Eric Johnson Aug 24 '22 at 17:39
  • @GeorgeIrwin I don't understand what you're asking. Please clarify the question. Nothing I've addressed has any platform-specific considerations. – merv Aug 24 '22 at 17:54
  • You mentioned `@rpaths` which are Linux / macOS only, not? – Eric Johnson Aug 25 '22 at 07:31
  • @GeorgeIrwin okay, I see your point. I'm not sure how the relative linking is managed in Windows builds - from what I glean, Windows searches PATH and the local directory for libraries. You could investigate this by looking at the dependencies in the binaries of Conda packages. Nevertheless, to reuse Conda packages outside Conda, I'd expect you'd need to extract and move around all the dependency DLLs from multiple Conda packages in order to use a specialized NumPy or SciPy build. It's not going to be as simple as dropping the `site-packages/numpy` folder into a new location. – merv Aug 25 '22 at 22:31
1

As you have indicated, Intel provides instructions on how to install their versions. The problem seems to be that the version they provide are older than you are seeking, rather than how to install them.

As an alternative to using the packages found on the Intel Anaconda/PyPI page, you might check out this site for NumPy and SciPy MKL Windows AMD64 wheels. For instance they currently have numpy-1.23.5+mkl-cp311-cp311-win_amd64.whl.
This describes how to install a wheel.
This describes how to test if it is working.

Previously: site with older but more diverse wheels

First Last
  • 73
  • 4