You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to this error previously in opencv, I get the following error when importing cv-bridge:
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.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 "/opt/ros/humble/lib/my_driver/my_driver_node", line 33, in <module>
sys.exit(load_entry_point('my-driver==0.1.0', 'console_scripts', 'my_driver_node')())
File "/opt/ros/humble/lib/my_driver/my_driver_node", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/opt/ros/humble/lib/python3.10/site-packages/my_driver/my_driver_node.py", line 8, in <module>
from cv_bridge import CvBridge
File "/opt/ros/humble/local/lib/python3.10/dist-packages/cv_bridge/__init__.py", line 6, in <module>
from cv_bridge.boost.cv_bridge_boost import cvtColorForDisplay, getCvType
AttributeError: _ARRAY_API not found
It looks like cv-bridge installed via apt or pip is not yet built with numpy 2.0. Is the support for numpy 2.0 coming soon?
The text was updated successfully, but these errors were encountered:
From what I can see, the package relies on python-numpy in package.xml
Checking the version
apt search python3-numpy
Sorting... Done
Full Text Search... Done
python3-numpy/jammy-updates,jammy-security,now 1:1.21.5-1ubuntu22.04.1 amd64 [installed,automatic]
Fast array facility to the Python 3 language
Returns numpy at 1.21.5
So from what I can see we need to also submit a request to bump the numpy version in apt.
Currently, Ubuntu Jammy and Ubuntu Noble use NumPy 1.21 and 1.26 as their default binary versions, so there hasn't been a strong push to adopt NumPy 2 yet. However, pull requests to add support are always welcome.
Similar to this error previously in opencv, I get the following error when importing
cv-bridge
:It looks like
cv-bridge
installed viaapt
orpip
is not yet built with numpy 2.0. Is the support for numpy 2.0 coming soon?The text was updated successfully, but these errors were encountered: