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

Lars Grueter lagru at mailbox.org
Fri Jan 4 08:34:39 EST 2019


Dear devs,

If this is the wrong place for this kind of question I apologize and
feel free to ignore this or point me to the right place.

I'm using the conda package manager for my development environment which
used to work just fine with these steps:

> conda create -n dev-numpy python=3.7 numpy numpydoc cython pytest ipython coverage
> source activate dev-numpy
> conda uninstall --force numpy numpy-base
> pip install -e .

This would yield me a nice isolated playground and I could use

> python setup.py build_ext --incplace -j 4

at anytime to rebuild the binaries. Unfortunately the last two commands
stopped working out of the blue with my existing environment and fail with

> RuntimeError: Broken toolchain: cannot link a simple C program

(full output in [1]) on a clean repository. No recent changes to my tool
chain come to mind which could help me pinpoint the problem. Because it
used to work just fine I have the annoying feeling that the fix is
something small and trivial and have the hope that it's immediately
obvious to someone here or that you can suggest a way to debug this. In
any case your help would be appreciated.

I'm aware that this may be an exotic dev setup. Using a virtual
environment instead of the conda one works just fine. The build script
seems to use a different linear algebra library in that case: blas from
my OS as opposed to mkl in the conda environment. This is not my
preferred solution but it would do if nothing comes of this.

Some additional facts and research I've done:

- Using conda environments with asv has stopped working as well due to
not finding any LA library at all.
- If I'm understanding [1] correctly the build script finds the mkl
library provided by the conda environment.
- Trying earlier versions of NumPy shows the same behavior. I tested the
tags v1.14.6, v1.15.4.
- However creating a development environment for SciPy and scikit-image
using this approach still works fine.
- Searching the internet or looking at NumPy's build guide didn't yield
me a solution.
- I'm on linux (Manjaro) if that is of any relevance.
- Miniconda was reinstalled in my home directory with the installation
script provided through Anaconda's website.
- Haven't yet tried this approach in a fresh virtual machine.

I hope that I haven't overlooked something obvious. In any case thank
you for your time and attention.

Cheers, Lars

[1] https://gist.github.com/lagru/c6ac16b9984492850fe1174d6418b7b5


More information about the NumPy-Discussion mailing list