Using fuerte with python 3
I have seen that several issues regarding python 3 support have been solved recently, e.g. [1]. However, I could not find any information how to actually use the new release with python 3? That means how do I get the python libraries compiled and installed in a python3-compatible pythonpath etc.?
[1] https://code.ros.org/trac/ros/ticket/3166
Ok, trying michikarg's suggestion I end up in this error:
>>> import roslib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/vol/corcse/ros-fuerte/x86_64/src/ros-underlay/ros/core/roslib/src/roslib/__init__.py", line 50, in <module>
from roslib.launcher import load_manifest
File "/vol/corcse/ros-fuerte/x86_64/src/ros-underlay/ros/core/roslib/src/roslib/launcher.py", line 42, in <module>
import rospkg
ImportError: No module named rospkg
jwienke@augit:/vol/corcse/ros-fuerte/x86_64/src/PyYAML-3.10$ echo $PYTHONPATH
/vol/corcse/ros-fuerte/x86_64/lib/python3.1/site-packages:/vol/corcse/ros-fuerte/x86_64/src/ros-underlay/ros/core/roslib/src/
With the patch mentioned below I am now able to use roslib. However rospy and std_msgs do not work:
jwienke@augit:/vol/corcse/ros-fuerte/x86_64/src/ros-underlay/ros/core/roslib/src/roslib$ python3
Python 3.1.2 (r312:79147, Dec 9 2011, 20:47:34)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import rospy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/vol/corcse/ros-fuerte/x86_64/lib/python2.6/site-packages/ros_comm-1.8.7-py2.6.egg/rospy/__init__.py", line 47, in <module>
from std_msgs.msg import Header
File "/vol/corcse/ros-fuerte/x86_64/lib/python2.6/site-packages/std_msgs/msg/__init__.py", line 1, in <module>
from _Bool import *
ImportError: No module named _Bool