Skip to content

Can not build with new numpy version. #649

@AnilSarode

Description

@AnilSarode

cd gr-gsm
mkdir build
cd build
cmake ..
mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/
make

At last it gives the following error

NumPy 2.1.2 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 "/usr/bin/grcc", line 53, in <module>
    check_gnuradio_import()
  File "/usr/bin/grcc", line 33, in check_gnuradio_import
    from gnuradio import gr
  File "/usr/lib/python3/dist-packages/gnuradio/gr/__init__.py", line 30, in <module>
    from .gr_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/dist-packages/gnuradio/gr/__init__.py", line 26, in <module>
    from .gr_python import *
ImportError: initialization failed

During handling of the above exception, another exception occurred:

AttributeError: _ARRAY_API not found
ImportError

Cannot import gnuradio.

Is the Python path environment variable set correctly?
    All OS: PYTHONPATH

Is the library path environment variable set correctly?
    Linux: LD_LIBRARY_PATH
    Windows: PATH

See https://wiki.gnuradio.org/index.php/ModuleNotFoundError


(initialization failed)
make[2]: *** [apps/CMakeFiles/pygen_apps.dir/build.make:97: apps/grgsm_livemon] Error 1
make[1]: *** [CMakeFiles/Makefile2:867: apps/CMakeFiles/pygen_apps.dir/all] Error 2
make: *** [Makefile:146: all] Error 2```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions