scipy: BUG: Windows Built SciPy can't import _fblas via pip install .
Describe your issue.
After building SciPy main branch, installing it systemwide via pip install .
leads to broken import. This happens even building NumPy locally with the locally built OpenBLAS.
In [6]: np.show_config()
blas_armpl_info:
NOT AVAILABLE
blas_mkl_info:
NOT AVAILABLE
blis_info:
NOT AVAILABLE
openblas_info:
library_dirs = ['C:\\Users\\ilhan\\Documents\\GitHub\\numpy\\build\\openblas_info']
libraries = ['openblas_info']
language = f77
define_macros = [('HAVE_CBLAS', None)]
blas_opt_info:
library_dirs = ['C:\\Users\\ilhan\\Documents\\GitHub\\numpy\\build\\openblas_info']
libraries = ['openblas_info']
language = f77
define_macros = [('HAVE_CBLAS', None)]
lapack_armpl_info:
NOT AVAILABLE
lapack_mkl_info:
NOT AVAILABLE
openblas_lapack_info:
library_dirs = ['C:\\Users\\ilhan\\Documents\\GitHub\\numpy\\build\\openblas_lapack_info']
libraries = ['openblas_lapack_info']
language = f77
define_macros = [('HAVE_CBLAS', None)]
lapack_opt_info:
library_dirs = ['C:\\Users\\ilhan\\Documents\\GitHub\\numpy\\build\\openblas_lapack_info']
libraries = ['openblas_lapack_info']
language = f77
define_macros = [('HAVE_CBLAS', None)]
Supported SIMD extensions in this NumPy install:
baseline = SSE,SSE2,SSE3
found = SSSE3,SSE41,POPCNT,SSE42,AVX,F16C,FMA3,AVX2,AVX512F,AVX512CD,AVX512_SKX,AVX512_CLX,AVX512_CNL,AVX512_ICL
not found =
Reproducing Code Example
C:\Users\ilhan\Documents\GitHub\scipy [main ≡]> $env:PKG_CONFIG_PATH="C:\opt\64\lib\pkgconfig\"
C:\Users\ilhan\Documents\GitHub\scipy [main ≡]> $env:CC="x86_64-w64-mingw32-gcc";$env:CXX="x86_64-w64-mingw32-g++"
C:\Users\ilhan\Documents\GitHub\scipy [main ≡]> pip install .
Processing c:\users\ilhan\documents\github\scipy
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.19.5 in c:\users\ilhan\appdata\local\programs\python\python310\lib\site-packages\numpy-1.24.0.dev0+695.g50a74fb65-py3.10-win-amd64.egg (from scipy==1.10.0.dev0) (1.24.0.dev0+695.g50a74fb65)
Building wheels for collected packages: scipy
Building wheel for scipy (pyproject.toml) ... done
Created wheel for scipy: filename=scipy-1.10.0.dev0-cp310-cp310-win_amd64.whl size=47000726 sha256=35808c560f2e33dafe3ced612713c8565d77b105aec693124ae4d13cde1afdb8
Stored in directory: C:\Users\ilhan\AppData\Local\Temp\pip-ephem-wheel-cache-04ckr_zh\wheels\63\13\46\e3e2e5525b45f526ecce5f57def1f4d2068c8fc759a4aae4eb
Successfully built scipy
Installing collected packages: scipy
Successfully installed scipy-1.10.0.dev0
Error message
C:\Users\ilhan\Documents> ipython
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.4.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import scipy.linalg as la
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 import scipy.linalg as la
File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\linalg\__init__.py:197, in <module>
1 """
2 ====================================
3 Linear algebra (:mod:`scipy.linalg`)
(...)
194
195 """ # noqa: E501
--> 197 from ._misc import *
198 from ._cythonized_array_utils import *
199 from ._basic import *
File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\linalg\_misc.py:3, in <module>
1 import numpy as np
2 from numpy.linalg import LinAlgError
----> 3 from .blas import get_blas_funcs
4 from .lapack import get_lapack_funcs
6 __all__ = ['LinAlgError', 'LinAlgWarning', 'norm']
File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\linalg\blas.py:213, in <module>
210 import numpy as _np
211 import functools
--> 213 from scipy.linalg import _fblas
214 try:
215 from scipy.linalg import _cblas
ImportError: DLL load failed while importing _fblas: The specified module could not be found.
SciPy/NumPy/Python version information
main, main, ‘3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]’
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (20 by maintainers)
For the interested here are the differences over the dependencies of OpenBLAS
Working one
Broken one