BUG: Combining SciPy 1.14.1 and statsmodels 0.14.2 on OSX causes "symbol not found in flat namespace '_npy_cabs'"
Describe the bug
When importing statsmodels.api, the following error appears:
Traceback (most recent call last):
File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/test.py", line 1, in <module>
import statsmodels.api as sm
File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/api.py", line 136, in <module>
from .regression.recursive_ls import RecursiveLS
File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/regression/recursive_ls.py", line 14, in <module>
from statsmodels.tsa.statespace.mlemodel import (
File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/mlemodel.py", line 33, in <module>
from .simulation_smoother import SimulationSmoother
File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/simulation_smoother.py", line 11, in <module>
from .kalman_smoother import KalmanSmoother
File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/kalman_smoother.py", line 11, in <module>
from statsmodels.tsa.statespace.representation import OptionWrapper
File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/representation.py", line 10, in <module>
from .tools import (
File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/tools.py", line 14, in <module>
from . import (_initialization, _representation, _kalman_filter,
File "statsmodels/tsa/statespace/_initialization.pyx", line 1, in init statsmodels.tsa.statespace._initialization
ImportError: dlopen(/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/_representation.cpython-312-darwin.so, 0x0002): symbol not found in flat namespace '_npy_cabs'
This issue was originally reported on StackOverflow. I have independently reproduced the failure on OSX, but failed to reproduce it on Linux.
Curiously, this issue only shows up when SciPy 1.14.1 is installed. If SciPy 1.14.0 is installed, this error does not show up. Similarly, if statsmodels 0.14.1 is installed, the issue also goes away. Strangely, downgrading from statsmodels 0.14.2 to 0.14.1 and upgrading back to 0.14.2 also fixes the issue.
I'm unsure if this is a bug in statsmodels or SciPy - it seems very strange that a change in another package could cause this kind of error.
Code Sample, a copy-pastable example if possible
import statsmodels.api as sm
If you are using a released version, have you verified that the bug exists in the main branch of this repository? It helps the limited resources if we know problems exist in the current main branch so that they do not need to check whether the code sample produces a bug in the next release.
I was unable to verify whether this issue has been fixed in main, because building the package from source also makes the issue go away.
For example, if I install scipy and statsmodels like this:
pip install scipy==1.14.1 git+https://github.com/statsmodels/[email protected]
the error goes away, despite being the same version that breaks when I use pre-built binaries.
Expected Output
I expected that the latest version of SciPy and statsmodels could be used together.
Output of import statsmodels.api as sm; sm.show_versions()
This is the output of import statsmodels.api as sm; sm.show_versions() for the working version of SciPy. After installing SciPy 1.14.1, import statsmodels.api as sm no longer works.
import statsmodels.api as sm; sm.show_versions()
INSTALLED VERSIONS
Python: 3.12.5.final.0 OS: Darwin 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:54 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6030 arm64 byteorder: little LC_ALL: None LANG: en_US.UTF-8
statsmodels
Installed: 0.14.2 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels)
Required Dependencies
cython: Not installed numpy: 2.1.0 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/numpy) scipy: 1.14.0 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/scipy) pandas: 2.2.2 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/pandas) dateutil: 2.9.0.post0 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/dateutil) patsy: 0.5.6 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/patsy)
Optional Dependencies
matplotlib: Not installed cvxopt: Not installed joblib: Not installed
Developer Tools
IPython: Not installed jinja2: Not installed sphinx: Not installed pygments: Not installed pytest: Not installed virtualenv: Not installed
Additional details:
x-ref scipy/scipy#21434
What happens if you downgrade to NumPy 2.0.x?
On Thu, Aug 22, 2024, 19:18 Nick ODell @.***> wrote:
Describe the bug
When importing statsmodels.api, the following error appears:
Traceback (most recent call last): File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/test.py", line 1, in
import statsmodels.api as sm File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/api.py", line 136, in from .regression.recursive_ls import RecursiveLS File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/regression/recursive_ls.py", line 14, in from statsmodels.tsa.statespace.mlemodel import ( File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/mlemodel.py", line 33, in from .simulation_smoother import SimulationSmoother File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/simulation_smoother.py", line 11, in from .kalman_smoother import KalmanSmoother File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/kalman_smoother.py", line 11, in from statsmodels.tsa.statespace.representation import OptionWrapper File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/representation.py", line 10, in from .tools import ( File "/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/tools.py", line 14, in from . import (_initialization, _representation, _kalman_filter, File "statsmodels/tsa/statespace/_initialization.pyx", line 1, in init statsmodels.tsa.statespace._initialization ImportError: dlopen(/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels/tsa/statespace/_representation.cpython-312-darwin.so, 0x0002): symbol not found in flat namespace '_npy_cabs' This issue was originally reported on StackOverflow https://stackoverflow.com/questions/78900274/scipy-1-14-1-breaks-statsmodels-0-14-2. I have independently reproduced the failure on OSX, but failed to reproduce it on Linux.
Curiously, this issue only shows up when SciPy 1.14.1 is installed. If SciPy 1.14.0 is installed, this error does not show up. Similarly, if statsmodels 0.14.1 is installed, the issue also goes away. Strangely, downgrading from statsmodels 0.14.2 to 0.14.1 and upgrading back to 0.14.2 also fixes the issue.
I'm unsure if this is a bug in statsmodels or SciPy - it seems very strange that a change in another package could cause this kind of error. Code Sample, a copy-pastable example if possible
import statsmodels.api as sm
If you are using a released version, have you verified that the bug exists in the main branch of this repository? It helps the limited resources if we know problems exist in the current main branch so that they do not need to check whether the code sample produces a bug in the next release.
I was unable to verify whether this issue has been fixed in main, because building the package from source also makes the issue go away.
For example, if I install scipy and statsmodels like this:
pip install scipy==1.14.1 @.***
the error goes away, despite being the same version that breaks when I use pre-built binaries. Expected Output
I expected that the latest version of SciPy and statsmodels could be used together. Output of import statsmodels.api as sm; sm.show_versions()
This is the output of import statsmodels.api as sm; sm.show_versions() for the working version of SciPy. After installing SciPy 1.14.1, import statsmodels.api as sm no longer works.
import statsmodels.api as sm; sm.show_versions()
INSTALLED VERSIONS
Python: 3.12.5.final.0 OS: Darwin 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:54 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6030 arm64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 statsmodels
Installed: 0.14.2 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/statsmodels) Required Dependencies
cython: Not installed numpy: 2.1.0 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/numpy) scipy: 1.14.0 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/scipy) pandas: 2.2.2 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/pandas) dateutil: 2.9.0.post0 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/dateutil) patsy: 0.5.6 (/private/var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh/venv/lib/python3.12/site-packages/patsy) Optional Dependencies
matplotlib: Not installed cvxopt: Not installed joblib: Not installed Developer Tools
IPython: Not installed jinja2: Not installed sphinx: Not installed pygments: Not installed pytest: Not installed virtualenv: Not installed Additional details:
x-ref scipy/scipy#21434 https://github.com/scipy/scipy/issues/21434
— Reply to this email directly, view it on GitHub https://github.com/statsmodels/statsmodels/issues/9333, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKTSRKGBYOFVWDEFQ3XME3ZSYTQHAVCNFSM6AAAAABM6VWXQKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4DCNBUGI4TQNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Should have nothing to do with SciPy, but perhaps SciPy 1.14 is bumping NumPy to 2.1.0, while SciPy 1.13 is happy with NumPy 2.0.x.
What happens if you downgrade to NumPy 2.0.x?
Curiously, the configuration pip install scipy==1.14.1 statsmodels==0.14.2 numpy==2.0.1 works.
Should have nothing to do with SciPy, but perhaps SciPy 1.14 is bumping NumPy to 2.1.0
According to pip freeze, both working and non-working configurations have the same NumPy version. The only package that differs is SciPy.
Working:
numpy==2.1.0
packaging==24.1
pandas==2.2.2
patsy==0.5.6
python-dateutil==2.9.0.post0
pytz==2024.1
scipy==1.14.0
six==1.16.0
statsmodels==0.14.2
tzdata==2024.1
Failing:
numpy==2.1.0
packaging==24.1
pandas==2.2.2
patsy==0.5.6
python-dateutil==2.9.0.post0
pytz==2024.1
scipy==1.14.1
six==1.16.0
statsmodels==0.14.2
tzdata==2024.1
I've done a test of all combinations of SciPy 1.14.0/1.14.1, NumPy 2.0.1/2.1.0, and statsmodels 0.14.1/0.14.2.
The result is that the only failing configuration is latest SciPy plus latest NumPy plus latest statsmodels.
scipy Version |
statsmodels Version |
numpy Version |
Compatibility |
|---|---|---|---|
| 1.14.0 | 0.14.1 | 2.0.1 | incompatible (statsmodels requires numpy < 2) |
| 1.14.0 | 0.14.1 | 2.1.0 | incompatible (statsmodels requires numpy < 2) |
| 1.14.0 | 0.14.1 | 1.26.4 | works |
| 1.14.0 | 0.14.2 | 2.0.1 | works |
| 1.14.0 | 0.14.2 | 2.1.0 | works |
| 1.14.1 | 0.14.1 | 2.0.1 | incompatible (statsmodels requires numpy < 2) |
| 1.14.1 | 0.14.1 | 2.1.0 | incompatible (statsmodels requires numpy < 2) |
| 1.14.1 | 0.14.1 | 1.26.4 | works |
| 1.14.1 | 0.14.2 | 2.0.1 | works |
| 1.14.1 | 0.14.2 | 2.1.0 | fails |
Everything else either works, or pip refuses to install that combination of packages.
Sounds like the both used to export the symbol but have both stopped.
On Thu, Aug 22, 2024, 20:01 Nick ODell @.***> wrote:
I've done a test of all combinations of SciPy 1.14.0/1.14.1, NumPy 2.0.1/2.1.0, and statsmodels 0.14.1/0.14.2.
The result is that the only failing configuration is latest SciPy plus latest NumPy plus latest statsmodels. scipy Version statsmodels Version numpy Version Compatibility 1.14.0 0.14.1 2.0.1 incompatible (statsmodels requires numpy < 2) 1.14.0 0.14.1 2.1.0 incompatible (statsmodels requires numpy < 2) 1.14.0 0.14.1 1.26.4 works 1.14.0 0.14.2 2.0.1 works 1.14.0 0.14.2 2.1.0 works 1.14.1 0.14.1 2.0.1 incompatible (statsmodels requires numpy < 2) 1.14.1 0.14.1 2.1.0 incompatible (statsmodels requires numpy < 2) 1.14.1 0.14.1 1.26.4 works 1.14.1 0.14.2 2.0.1 works 1.14.1 0.14.2 2.1.0 fails
Everything else either works, or pip refuses to install that combination of packages.
— Reply to this email directly, view it on GitHub https://github.com/statsmodels/statsmodels/issues/9333#issuecomment-2305438605, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKTSRMFUBBZUVROO5YV5SLZSYYPTAVCNFSM6AAAAABM6VWXQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVGQZTQNRQGU . You are receiving this because you commented.Message ID: @.***>
You're right. It took me a bit of googling to work out how to view the symbol tables, but NumPy 2.1.0 no longer exports this symbol, and SciPy 1.14.1 no longer exports it either.
$ pip install numpy==2.1.0 1 ↵
(venv) nick@Nicks-MacBook-Pro /var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh
$ pip install scipy==1.14.0 130 ↵
Collecting scipy==1.14.0
Using cached scipy-1.14.0-cp312-cp312-macosx_14_0_arm64.whl.metadata (60 kB)
Requirement already satisfied: numpy<2.3,>=1.23.5 in ./venv/lib/python3.12/site-packages (from scipy==1.14.0) (2.1.0)
Using cached scipy-1.14.0-cp312-cp312-macosx_14_0_arm64.whl (23.1 MB)
Installing collected packages: scipy
Attempting uninstall: scipy
Found existing installation: scipy 1.14.1
Uninstalling scipy-1.14.1:
Successfully uninstalled scipy-1.14.1
Successfully installed scipy-1.14.0
(venv) nick@Nicks-MacBook-Pro /var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh
$ nm -gU venv/lib/python3.12/site-packages/scipy/special/_ufuncs.cpython-312-darwin.so | grep cabs
000000000007c248 T _npy_cabs
000000000007c204 T _npy_cabsf
000000000007c28c T _npy_cabsl
(venv) nick@Nicks-MacBook-Pro /var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh
$ pip install scipy==1.14.1
Collecting scipy==1.14.1
Using cached scipy-1.14.1-cp312-cp312-macosx_14_0_arm64.whl.metadata (60 kB)
Requirement already satisfied: numpy<2.3,>=1.23.5 in ./venv/lib/python3.12/site-packages (from scipy==1.14.1) (2.1.0)
Using cached scipy-1.14.1-cp312-cp312-macosx_14_0_arm64.whl (23.1 MB)
Installing collected packages: scipy
Attempting uninstall: scipy
Found existing installation: scipy 1.14.0
Uninstalling scipy-1.14.0:
Successfully uninstalled scipy-1.14.0
Successfully installed scipy-1.14.1
(venv) nick@Nicks-MacBook-Pro /var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh
$ nm -gU venv/lib/python3.12/site-packages/scipy/special/_ufuncs.cpython-312-darwin.so | grep cabs
(venv) nick@Nicks-MacBook-Pro /var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh
$ pip install numpy==2.0.1 1 ↵
Collecting numpy==2.0.1
Using cached numpy-2.0.1-cp312-cp312-macosx_14_0_arm64.whl.metadata (60 kB)
Using cached numpy-2.0.1-cp312-cp312-macosx_14_0_arm64.whl (5.0 MB)
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 2.1.0
Uninstalling numpy-2.1.0:
Successfully uninstalled numpy-2.1.0
Successfully installed numpy-2.0.1
(venv) nick@Nicks-MacBook-Pro /var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh
$ nm -gU venv/lib/python3.12/site-packages/scipy/special/_ufuncs.cpython-312-darwin.so | grep cabs
(venv) nick@Nicks-MacBook-Pro /var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh
$ nm -gU venv/lib/python3.12/site-packages/numpy/linalg/_umath_linalg.cpython-312-darwin.so | grep cabs 1 ↵
00000000000148c0 T _npy_cabs
000000000001487c T _npy_cabsf
0000000000014904 T _npy_cabsl
(venv) nick@Nicks-MacBook-Pro /var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh
$ pip install numpy==2.1.0
Collecting numpy==2.1.0
Using cached numpy-2.1.0-cp312-cp312-macosx_14_0_arm64.whl.metadata (60 kB)
Using cached numpy-2.1.0-cp312-cp312-macosx_14_0_arm64.whl (5.1 MB)
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 2.0.1
Uninstalling numpy-2.0.1:
Successfully uninstalled numpy-2.0.1
Successfully installed numpy-2.1.0
(venv) nick@Nicks-MacBook-Pro /var/folders/7v/pg90myg55bs218ff8dpkrfrc0000gn/T/tmp.8CjfzJEYnh
$ nm -gU venv/lib/python3.12/site-packages/numpy/linalg/_umath_linalg.cpython-312-darwin.so | grep cabs
SciPy used to export the symbol via scipy/special/_ufuncs.cpython-312-darwin.so, and NumPy used to export it via numpy/linalg/_umath_linalg.cpython-312-darwin.so.
We can't reproduce on CI:
https://dev.azure.com/statsmodels/statsmodels-testing/_build/results?buildId=5869&view=logs&j=ff02c0bf-a6da-574b-cd48-e6a8a9d1f05d Configuration:
build 1.2.1
certifi 2024.7.4
colorama 0.4.6
contourpy 1.2.1
coverage 7.6.1
cycler 0.12.1
Cython 3.0.11
execnet 2.1.1
flake8 7.1.1
fonttools 4.53.1
iniconfig 2.0.0
isort 5.13.2
joblib 1.4.2
kiwisolver 1.4.5
matplotlib 3.9.2
mccabe 0.7.0
numpy 2.1.0
packaging 24.1
pandas 2.2.2
patsy 0.5.6
pillow 10.4.0
pip 24.2
pluggy 1.5.0
pycodestyle 2.12.1
pyflakes 3.2.0
pyparsing 3.1.2
pyproject_hooks 1.1.0
pytest 7.4.4
pytest-cov 5.0.0
pytest-randomly 3.15.0
pytest-xdist 3.6.1
python-dateutil 2.9.0.post0
pytz 2024.1
scipy 1.14.1
setuptools 73.0.1
setuptools-scm 8.1.0
six 1.16.0
statsmodels 0.15.0.dev334+gde18b6fbb /Users/runner/work/1/s
tzdata 2024.1
wheel 0.44.0
I wonder if it matters that the CI one is built against scipy 1.14.1 - not 100% but could imagine that since SciPy doesn't have the symbol anymore, it is finding it from NumPy and so is happy. The release 0.14.2 was built against SciPy 1.13 and probably expects to find the symbol there. At least this is my working hypothesis.
0.15.0.dev334+gde18b6fbb
I just tried running with a Pipfile -
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
jupyter = "*"
pandas = "2.2.2"
matplotlib = "*"
scipy = "1.14.1"
numpy = "2.1.0"
statsmodels = "0.14.2"
[dev-packages]
[requires]
python_version = "3.12"
Output:
ImportError: dlopen(/Users/$USER/.local/share/virtualenvs/machine_learning_course-oXhJl1U5/lib/python3.12/site-packages/statsmodels/tsa/statespace/_representation.cpython-312-darwin.so, 0x0002): symbol not found in flat namespace '_npy_cabs'
MAC:
| Chip | Apple M1 Pro |
|---|---|
| Memory | 32G |
| MacOS | 14.5 |
We have a similar issue in our CI, see this run for example. Numpy 2.1.1, SciPy 1.14.1 and statsmodels 0.14.2. Also happening only on macOS.
Also on macOS. this run. Numpy 2.1.0, SciPy 1.14.1 and statsmodels 0.14.2.
I am having the same problem while using any combinations of python==3.10.15, scipy==1.14.0/1.14.1/1.14.2, numpy==2.0.1/2.1.1 and statsmodels==0.14.2
There seems to be a decent bug here that isn't easy to fix. It appears in the 0.14.2 code even if built against SciPy 1.14.1.
The source of the issue has been found. It is due to some changes in the arch used by the GitHub MaxOS runners, which were previously x86_64 and have moved to arm64. This means that the x86_64 wheels were not correctly linked. The fix is in place, although there are a number of bugs due to changes in other libraries (probably pandas) that need to be addressed before we can release 0.14.3.
https://github.com/MacPython/statsmodels-wheels/actions/runs/10844514094
Appears to be fixed now. Will need a release note and then likely to release early next week.
https://github.com/MacPython/statsmodels-wheels/actions/runs/10848683287
Wheels are on PyPi (excluding a couple that are slow building). Closing. Please let us know if there continues to be a problem.
I can confirm statsmodels 0.14.3 resolves this bug for us, and our CI now passes again!
Thanks a lot for the time and effort to crack this complex bug!
Hi, original reporter here, I can confirm the issue is fixed on my computer with statmodels 0.14.3.