[Numpy-discussion] Debugging NumPy development build in conda environment

Lars Grueter lagru at mailbox.org
Sun Jan 13 08:44:59 EST 2019

Sorry, I just noticed that I didn't send the message below to the
mailing list but replied directly to Hameer. I've resent it for the
archives below.

@Hameer, sorry for the spam. :)

Best regards,

On 04/01/2019 20:06, Lars Grueter wrote:> Hi Hameer,
> thanks for the fast answer! I'm even more confused now. If any of my
> assumptions below are wrong please point them out.
> On 04.01.19 14:53, Hameer Abbasi wrote:
>> Hi Lars,
>> What I’m used to doing is simply the following (inside the NumPy root):
>>     conda create -n numpy-dev python=3[.x] pytest
>>     conda activate numpy-dev
>>     python setup.py build_ext --inplace -j 4
> This fails right here telling me that it doesn't find any LA library
> such as ATLAS, BLIS, MKL, etc. (assuming I read the output correctly).
> The error message is however different from the workflow I described in
> my first mail. It's missing the sections à la
> lapack_mkl_info:
> customize UnixCCompiler
>   FOUND:
>     libraries = ['mkl_rt', 'pthread']
> I checked my OS's package manager and found blas, cblas and lapack.
> Aren't these LA libraries? Am I still missing an OS version of either
> https://docs.scipy.org/doc/numpy/user/building.html#disabling-atlas-and-other-accelerated-libraries
> tells me it should be possible to build NumPy without these libraries.
> This has no effect and won't build.
> But if that's the case why is the build working inside an environment
> created with virtualenv? Is it building without those libraries?
>> Often, when I run into issues with the build, I simply do this:
>>     [backup site.cfg]
>>     git clean -xfd
>>     [restore site.cfg]
>>     python setup.py build_ext --inplace -j 4
>>     pip install -e . >
>> In your case, it might be the second that helps. If it’s not finding any
>> LA library, you can try compiling with the site.cfg that points to MKL.
> I didn't yet need my own site.cfg. I tried creating one myself right now
> but regardless of how I try to point it to the conda envs lib and
> include directories it has now effect on the output of the setup.py
> command. The build script already finds these paths by default. E.g.:
> [mkl]
> library_dirs = /home/lg/.miniconda3/envs/dev-numpy/lib
> include_dirs = /home/lg/.miniconda3/envs/dev-numpy/include
> mkl_libs = mkl_rt
> lapack_libs =
> I'm not sure what else to provide in this file.
> Thanks again and best regards,
> Lars

More information about the NumPy-Discussion mailing list