ros2 / rclpy

rclpy (ROS Client Library for Python)
Apache License 2.0
268 stars 221 forks source link

rclpy._rclpy_pybind11 #1224

Closed Someone22333 closed 4 months ago

Someone22333 commented 4 months ago

I have a problem with ROS2 on windows.

pygame 2.5.2 (SDL 2.28.3, Python 3.7.13) Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "main.py", line 12, in from SystemUnderTest.Sensors.Sensors import Sensors File "C:\Users\UIG70109\Downloads\CES_AI_SIMAI_sim_and_val-develop\SystemUnderTest\Sensors\Sensors.py", line 2, in import rclpy File "C:\dev\ros2_foxy\Lib\site-packages\rclpy\init.py", line 49, in from rclpy.signals import install_signal_handlers File "C:\dev\ros2_foxy\Lib\site-packages\rclpy\signals.py", line 15, in from rclpy.exceptions import InvalidHandle File "C:\dev\ros2_foxy\Lib\site-packages\rclpy\exceptions.py", line 15, in from rclpy.impl.implementation_singleton import rclpy_implementation as _rclpy File "C:\dev\ros2_foxy\Lib\site-packages\rclpy\impl\implementation_singleton.py", line 32, in rclpy_implementation = import_c_library('._rclpy_pybind11', package) File "C:\dev\ros2_foxy\Lib\site-packages\rpyutils\import_c_library.py", line 39, in import_c_library return importlib.import_module(name, package=package) File "C:\Users\UIG70109\AppData\Local\miniconda3\envs\carlaEnv\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named 'rclpy._rclpy_pybind11' The C extension 'C:\dev\ros2_foxy\Lib\site-packages_rclpy_pybind11.pyd' isn't present on the system. Please refer to 'https://docs.ros.org/en/iron/Guides/Installation-Troubleshooting.html#import-failing-without-library-present-on-the-system' for possible solutions

Anyone knows how to solve this ?

clalancette commented 4 months ago

Please open questions like this on https://robotics.stackexchange.com/questions/tagged/ros, which is our central Question and Answer site. You'll get a better answer there, and it will be searchable for the future.

Make sure to include a lot of information on what platform you are using, which ROS distribution you are using, and the exact steps you took.