build configuration

Asked by monkeybrain2012

Hi, I would like to know what is the configuration you use in compiling numpy. I have several blas libraries (openblas, mkl and the system blas) I am able to build numpy against any with site.cfg but I am not able switch the backend on the fly with update-alternatives. Once compiled numpy would use the same blas no matter what the update-alternative is.

 However the python3-numby package from Ubuntu can switch on the fly! I am wondering how you do that. (if I don't use a site.cfg then numpy would be compiled against the system blas aka the slow one)

I tried install with pip install --no-binary numpy numpy in ~/.local. tried the same version as in the repo (1.21.5, Ubuntu 22.04)


Question information

English Edit question
Ubuntu numpy Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
monkeybrain2012 (kammon101) said :

Hi, I still would know an answer

Revision history for this message
Manfred Hampl (m-hampl) said :

What exactly do you want to know?
Which Ubuntu release, which version of numpy, which CPU architecture, etc.?

If you visit you can see the sources and configuration settings that were used to build the different versions of numpy for the different Ubuntu releases. Some details can be seen in the buildlog files (reachable by the links per architecture below the heading "builds").

Revision history for this message
monkeybrain2012 (kammon101) said :

If I build numpy myself I use (or pip install --no-binary) with an optional site.cfg file (the template provided by numpy) to specify the blas used. I want to know what configuration is used. However this doesn't respect update-alternatives and is hard linked to the blas lib at build time. If I don't use a site.cfg or use the symlink from update-alternatives then it is linked to the slow blas.

I want to know how Ubuntu is able to build it so that it can link to any blas specified by update-alternatives on the fly. I can't find any info on that from the build log.

Can you help with this problem?

Provide an answer of your own, or ask monkeybrain2012 for more information if necessary.

To post a message you must log in.