When building NumPy from the source on Windows 10, the resulting .libs folder is not added to the path.
Reproducing code example:
The regular
python setup.py build
python setup.py install
machinery succeeds however afterwards numpy import fails with the recently reported ImportErrors elsewhere, say, #14896 and others.
This happens also on SciPy builds which were successfully working until I switched to Python 3.8. This is also reported on SciPy scipy/scipy#11062
It seems like the generated __config__.py has the lines
|
# For gfortran+msvc combination, extra shared libraries may exist |
|
f.write(textwrap.dedent(""" |
|
import os |
|
import sys |
|
|
|
extra_dll_dir = os.path.join(os.path.dirname(__file__), '.libs') |
|
|
|
if sys.platform == 'win32' and os.path.isdir(extra_dll_dir): |
|
os.environ.setdefault('PATH', '') |
|
os.environ['PATH'] += os.pathsep + extra_dll_dir |
|
|
|
""")) |
Somehow, .libs folder is not present on the src.win-amd64-3.8 but it is created in lib.win-amd64-3.8 and for reasons I have not yet understood, this if branch is not entered. On the linked SciPy issue, the file is modified manually to add the libs to the path.
Hence I am under the impression that it is not necessarily an Anaconda issue but something has changed along the way, that is maybe, Python3.8 related.
When building NumPy from the source on Windows 10, the resulting
.libsfolder is not added to the path.Reproducing code example:
The regular
machinery succeeds however afterwards numpy import fails with the recently reported
ImportErrors elsewhere, say, #14896 and others.This happens also on SciPy builds which were successfully working until I switched to Python 3.8. This is also reported on SciPy scipy/scipy#11062
It seems like the generated
__config__.pyhas the linesnumpy/numpy/distutils/misc_util.py
Lines 2324 to 2335 in 6e75b9a
Somehow, .libs folder is not present on the
src.win-amd64-3.8but it is created inlib.win-amd64-3.8and for reasons I have not yet understood, this if branch is not entered. On the linked SciPy issue, the file is modified manually to add the libs to the path.Hence I am under the impression that it is not necessarily an Anaconda issue but something has changed along the way, that is maybe, Python3.8 related.