@小鱼
不好意思,我现在送上文字版log,感谢感谢!
如下:
ModuleNotFoundError Traceback (most recent call last)
Cell In[2], line 1
----> 1 from rclpy.node import Node
File /opt/ros/foxy/lib/python3.8/site-packages/rclpy/node.py:42
40 from rclpy.callback_groups import MutuallyExclusiveCallbackGroup
41 from rclpy.callback_groups import ReentrantCallbackGroup
---> 42 from rclpy.client import Client
43 from rclpy.clock import Clock
44 from rclpy.clock import ROSClock
File /opt/ros/foxy/lib/python3.8/site-packages/rclpy/client.py:22
20 from rclpy.callback_groups import CallbackGroup
21 from rclpy.context import Context
---> 22 from rclpy.impl.implementation_singleton import rclpy_implementation as _rclpy
23 from rclpy.qos import QoSProfile
24 from rclpy.task import Future
File /opt/ros/foxy/lib/python3.8/site-packages/rclpy/impl/implementation_singleton.py:31
15 """
16 Provide singleton access to the rclpy C modules.
17
(...)
26 # ...
27 """
29 from rclpy.impl import _import
---> 31 rclpy_implementation = _import('._rclpy')
32 rclpy_action_implementation = _import('._rclpy_action')
33 rclpy_logging_implementation = _import('._rclpy_logging')
File /opt/ros/foxy/lib/python3.8/site-packages/rclpy/impl/init.py:28, in _import(name)
23 try:
24 # Since Python 3.8, on Windows we should ensure DLL directories are
25 # explicitly added to the search path.
26 # See https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew
27 with add_dll_directories_from_env('PATH'):
---> 28 return importlib.import_module(name, package='rclpy')
29 except ImportError as e:
30 if e.path is None:
File ~/miniconda3/lib/python3.9/importlib/init.py:127, in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'rclpy._rclpy'
The C extension '/opt/ros/foxy/lib/python3.8/site-packages/rclpy/_rclpy.cpython-39-x86_64-linux-gnu.so' isn't present on the system. Please refer to 'https://index.ros.org/doc/ros2/Troubleshooting/Installation-Troubleshooting/#import-failing-without-library-present-on-the-system' for possible solutions