[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Import error No module named 'rclpy._rclpy' cross compiling

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Import error No module named 'rclpy._rclpy' cross compiling

Ahmed Ali via ros-users


Hi,

I am _cross compiling_ ros2 beta2 for a ARM platform. I get the source `. ./setup.sh` done and after I try to launch the python talker but `rclpy._rclpy` cannot be imported. The default Python version is Python 3.5.

The talker written with C++ works perfect.

I also tried to update the `rclpy` repo to the latest version, and I am getting the same error.
```bash
root@host:/opt/ros2/# /opt/ros2/lib/demo_nodes_py/talker
Traceback (most recent call last):
  File "/opt/ros2/lib/demo_nodes_py/talker", line 9, in <module>
    load_entry_point('demo-nodes-py==0.0.0', 'console_scripts', 'talker')()
  File "/usr/lib/python3.5/site-packages/setuptools-22.0.5-py3.5.egg/pkg_resources/__init__.py", line 542, in load_entry_point
  File "/usr/lib/python3.5/site-packages/setuptools-22.0.5-py3.5.egg/pkg_resources/__init__.py", line 2569, in load_entry_point
  File "/usr/lib/python3.5/site-packages/setuptools-22.0.5-py3.5.egg/pkg_resources/__init__.py", line 2229, in load
  File "/usr/lib/python3.5/site-packages/setuptools-22.0.5-py3.5.egg/pkg_resources/__init__.py", line 2235, in resolve
  File "/opt/ros2/lib/python3.5/site-packages/topics/talker.py", line 18, in <module>
    import rclpy
  File "/opt/ros2/lib/python3.5/site-packages/rclpy/__init__.py", line 18, in <module>
    from rclpy.impl.implementation_singleton import rclpy_implementation as _rclpy
  File "/opt/ros2/lib/python3.5/site-packages/rclpy/impl/implementation_singleton.py", line 32, in <module>
    rclpy_implementation = importlib.import_module('._rclpy', package='rclpy')
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named 'rclpy._rclpy'
```
I have noticed that are similar errors at Windows platform.
https://discourse.ros.org/t/failed-to-load-entry-point-for-command-ros2/2363

Regards and thanks.





---
[Visit Topic](https://discourse.ros.org/t/import-error-no-module-named-rclpy--rclpy-cross-compiling/2463/1) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Import error No module named 'rclpy._rclpy' cross compiling

Ahmed Ali via ros-users


Hi guys!

any updates about this? I'm having the same issue.

Thanks in advance.

Regards

@LanderU





---
[Visit Topic](https://discourse.ros.org/t/import-error-no-module-named-rclpy--rclpy-cross-compiling/2463/2) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Import error No module named 'rclpy._rclpy' cross compiling

Ahmed Ali via ros-users
In reply to this post by Ahmed Ali via ros-users


@LanderU can you please open an issue on the [rclpy repository](https://github.com/ros2/rclpy/) with all the information regarding your setup and your install ?

Regarding cross-compilation, sorry @abilbaotm for missing this thread.  AFAIK we haven't tried to cross-compile the Python stack. The logic of the python imports has changes quite a bit since beta2 so the situation may be different today. If you happen to be willing to give it another shot and report here with the details of how you defined and linked against your targets' python libraries that would be helpful.
In the meantime for ARM users we do provide ros2 debs for aarch64 on repo.ros2.org and nightly aarch64 builds [here](http://ci.ros2.org/view/packaging/job/packaging_linux-aarch64/lastSuccessfulBuild/artifact/).

Thanks you both for reporting these issues





---
[Visit Topic](https://discourse.ros.org/t/import-error-no-module-named-rclpy--rclpy-cross-compiling/2463/3) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Import error No module named 'rclpy._rclpy' cross compiling

Ahmed Ali via ros-users
In reply to this post by Ahmed Ali via ros-users


Hi @marguedas,

thanks for the reply. I was able to avoid the error. It seems that when we try to cross compile it is not deploying the necessary stuff with the proper names (arm...)

Regards,

@LanderU





---
[Visit Topic](https://discourse.ros.org/t/import-error-no-module-named-rclpy--rclpy-cross-compiling/2463/4) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Import error No module named 'rclpy._rclpy' cross compiling

Ahmed Ali via ros-users
In reply to this post by Ahmed Ali via ros-users


We also discovered that buying ARM processors is cheaper than making the cross-compile work.





---
[Visit Topic](https://discourse.ros.org/t/import-error-no-module-named-rclpy--rclpy-cross-compiling/2463/5) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>