kinetic python3 turtlebot
Hi,
I need to work with python3 for some works, so I install anaconda3 in my home directory and put in ~/.bashrc the line: export PATH="/home/util1/anaconda3/bin:$PATH" No problem with this, it works.
But when I want to use package turtlebot with the command "roslaunch turtlebot_bringup minimal.launch", I have the following message. As you can see it uses python 2.7 under ros kinetic and also go to find some things in anaconda3 python3.5.
Any idea to deal with this ? Is-it possible to use another version of python with kinectic and turtlebot ?
Thanks.
File "/opt/ros/kinetic/share/xacro/xacro.py", line 55, in <module>
import xacro
File "/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/__init__.py", line 35, in <module>
import glob
File "/home/util1/anaconda3/lib/python3.5/glob.py", line 4, in <module>
import re
ImportError: No module named 're'
while processing /opt/ros/kinetic/share/turtlebot_bringup/launch/includes/robot.launch.xml:
while processing /opt/ros/kinetic/share/turtlebot_bringup/launch/includes/description.launch.xml:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/share/xacro/xacro.py '/opt/ros/kinetic/share/turtlebot_description/robots/kobuki_hexagons_kinect.urdf.xacro'] returned with code [1].
Param xml is <param command="$(arg urdf_file)" name="robot_description"/>
The traceback for the exception was written to the log file
Your call stack seems to be mixing python 2 and python 3 versions.
seems like a conflict between anaconda and ros. Comment the bash line that include anaconda in the PATH environment and try again.
Hi,
Thanks for answers. I understand it's a problem mixing python 2 and 3. When I remove the line in my ~/.bashrc, it works.
My question was: how to deal with this, and if possible using python 3 with ROS.
Have a nice day,
Goupil
I never mixed python 3 with ROS but do you tried to install python3 through the repositories and not through anaconda?