osmado / ev3dev_ros_distribution

Ros Jade distribution and ev3dev
2 stars 0 forks source link

Python 3 not supported #2

Open fferri opened 7 years ago

fferri commented 7 years ago

Since ev3dev project has dropped Python 2 support, I tried to use Python 3 to write a node, but it does not work.

The first issue I encountered is that yaml package is not installed for Python 3, solved by installing python3-yaml.

Then rospkg is not found:

robot@ev3dev:~$ python3
Python 3.4.2 (default, Oct  8 2014, 14:47:30)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rospy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/ros/jade/lib/python2.7/dist-packages/rospy/__init__.py", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/jade/lib/python2.7/dist-packages/rospy/client.py", line 52, in <module>
    import roslib
  File "/opt/ros/jade/lib/python2.7/dist-packages/roslib/__init__.py", line 50, in <module>
    from roslib.launcher import load_manifest
  File "/opt/ros/jade/lib/python2.7/dist-packages/roslib/launcher.py", line 42, in <module>
    import rospkg
ImportError: No module named 'rospkg'
>>>

Package python3-rospkg (as suggested here http://answers.ros.org/question/245967/importerror-no-module-named-rospkg-python3-solved/) does not exist.

Do you think it is possible to support Python 3 as well?

osmado commented 7 years ago

I am afraid that I don't know answer your question. I am beginner both in ev3dev and in ROS.

When I started with this project I needed to modify a python file, but it was python 2. Beside, I made a very simple node as example. But, this node was written in C.

Maybe someone in the ev3dev project could answer you.

Thanks for visit my project and sorry.