Skip to content
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

PyPI release: numpy v2 compatible #62

Open
lucaspar opened this issue Aug 30, 2024 · 2 comments
Open

PyPI release: numpy v2 compatible #62

lucaspar opened this issue Aug 30, 2024 · 2 comments

Comments

@lucaspar
Copy link

lucaspar commented Aug 30, 2024

Hi @ryanvolz, just checking if we can expect a numpy v2 compatible release on PyPI soon.

I'm getting the following import error so far. It seems the conda release might work right now, but a PyPI release would let us use digital-rf with several other package managers.

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.0 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.

Traceback (most recent call last):  File "/home/user/drf-demo/digitalrf_demo.py", line 7, in <module>
    import digital_rf as drf
  File "/home/user/drf-demo/.venv/lib/python3.12/site-packages/digital_rf/__init__.py", line 7, in <module>
    from .digital_rf_hdf5 import *  # noqa: F401,F403
  File "/home/user/drf-demo/.venv/lib/python3.12/site-packages/digital_rf/digital_rf_hdf5.py", line 36, in <module>
    from . import _py_rf_write_hdf5, digital_metadata, list_drf
Traceback (most recent call last):
  File "/home/user/drf-demo/.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.0 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'.
@rrobinett
Copy link

I am having the same problem running digital_rf in Ubuntu 24.04.
It runs only on numpy 1.26.4, but Ubuntu includes 2.1.2 and all other python packages require numpy 2.1.1*
It is a real programming mess to install and run two different versions of numpy.

@ryanvolz
Copy link
Member

I hear you! I intend to get binary releases back on PyPI at some point, but it requires re-doing the automated build since the old way that I used for prior releases doesn't work anymore. In the meantime I recommend the conda package which is much easier to keep up to date. And if that doesn't work for you, then you can build the latest release from source and have compatibility with numpy 2.

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