Skip to content

Conversation

@sdahdah
Copy link

@sdahdah sdahdah commented Nov 11, 2024

It seems that the Slycot wheels on PyPI were built with NumPy 1.X, but the pyproject.toml allows NumPy 2.X to be installed.

This means that if I create a fresh virtual environment and install Slycot, then it will pull NumPy 2.X, which makes the Slycot import fail.

I've added the version constraint in this PR, but if this is not what you had in mind, feel free to just close without merging.

@slivingston
Copy link
Member

The control package is intended to support NumPy 2 (python-control/python-control#1013 and python-control/python-control#994), and control uses Slycot, so the key question is: can Slycot be made compatible with both NumPy 1 and 2?

If not, or if it requires a lot of work, then your proposed change is a good temporary solution.

@slivingston slivingston self-assigned this Nov 11, 2024
@sdahdah
Copy link
Author

sdahdah commented Nov 11, 2024

I think building the wheels with NumPy 2 makes them compatible with NumPy 1 and 2

EDIT: https://numpy.org/doc/stable/dev/depending_on_numpy.html#numpy-2-0-specific-advice

@bnavigator
Copy link
Collaborator

There are no Slycot wheels on PyPI. We only publish the source distribution and it is compatible with NumPy 2.

@bnavigator bnavigator closed this Nov 12, 2024
@sdahdah
Copy link
Author

sdahdah commented Nov 12, 2024

There are no Slycot wheels on PyPI. We only publish the source distribution and it is compatible with NumPy 2.

My bad, there must be something else wrong on my end.

@bnavigator
Copy link
Collaborator

No worries, feel free to ask if you need more help. You probably just have to recompile/reinstall Slycot with numpy 2. Make sure to not use a previously compiled wheel from your local cache.

@sdahdah
Copy link
Author

sdahdah commented Nov 14, 2024

Thanks, the problem was actually a previously compiled wheel in my cache.

EDIT: To be more specific, the --no-cache-dir option in pip solved it for me.

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

Successfully merging this pull request may close these issues.

3 participants