Skip to content

community/gr-osmosdr: rebuild against NumPy 2

Michael Büchler requested to merge sly/aports:gr-osmosdr-rebuild-numpy2 into master

I was getting Python import errors in GNURadio Companion, and the same errors from just doing import osmosdr in a Python console (see below). I then built this package locally, installed it, and now it works.

I'm using postmarketOS on aarch64, with edge repos.

Python import error spam
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.

Traceback (most recent call last):  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.12/site-packages/osmosdr/__init__.py", line 17, in <module>
    from .osmosdr_python import *
AttributeError: _ARRAY_API not found

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.

Traceback (most recent call last):  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.12/site-packages/osmosdr/__init__.py", line 21, in <module>
    from .osmosdr_python import *
ImportError: numpy.core.multiarray failed to import

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/osmosdr/__init__.py", line 17, in <module>
    from .osmosdr_python import *
ImportError: initialization failed

During handling of the above exception, another exception occurred:

AttributeError: _ARRAY_API not found
ImportError: numpy.core.multiarray failed to import

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/osmosdr/__init__.py", line 17, in <module>
    from .osmosdr_python import *
ImportError: initialization failed

During handling of the above exception, another exception occurred:

ImportError: numpy.core.multiarray failed to import

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.12/site-packages/osmosdr/__init__.py", line 21, in <module>
    from .osmosdr_python import *
ImportError: initialization failed

Merge request reports

Loading