Skip to content

Slycot Numpy 2.0 warning #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tompkins-ct opened this issue Dec 11, 2024 · 2 comments
Closed

Slycot Numpy 2.0 warning #241

tompkins-ct opened this issue Dec 11, 2024 · 2 comments

Comments

@tompkins-ct
Copy link

Issue

The following warning is raised when using python-control:

Traceback (most recent call last):  File "./single_zone_temperature_controller.py", line 1, in <module>
    import control as ct
  File "/.venv/lib/python3.12/site-packages/control/__init__.py", line 77, in <module>
    from .statesp import *
  File "/.venv/lib/python3.12/site-packages/control/statesp.py", line 75, in <module>
    from slycot import ab13dd
  File "/.venv/lib/python3.12/site-packages/slycot/__init__.py", line 31, in <module>
    from .analysis import (ab01nd,
  File "/.venv/lib/python3.12/site-packages/slycot/analysis.py", line 22, in <module>
    from . import _wrapper
Traceback (most recent call last):
  File "/.venv/lib/python3.12/site-packages/numpy/core/_multiarray_umath.py", line 44, in __getattr__
    raise ImportError(msg)
ImportError: 
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.3 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

System

  • MacOS 15.1.1
  • Python 3.12.2
  • slycot 0.6.0
  • control 0.10.1
  • numpy 2.1.3
@murrayrm
Copy link
Member

How are you installing Slycot? See #240 if you are using pip.

@bnavigator
Copy link
Collaborator

We do not publish compiled Slycot wheels. Conda-forge has Slycot compiled with NumPy 2.

Reinstall Slycot, if you see this failure. Make sure to not use an old cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants