ros scripts and python related error

asked 2015-11-16 13:29:56 -0500

rnunziata gravatar image

Any ros script I run roslaunch roscore..etc. Is this a mismatch having both python2.7 and 3 installed or is there somthing else. And how would I go about resolving this issue. Thank you for your time.

> roscore
Traceback (most recent call last):
  File "/opt/ros/indigo/bin/roscore", line 62, in <module>
    import roslaunch
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/", line 51, in <module>
    from . import param_dump as roslaunch_param_dump
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/", line 40, in <module>
    import roslaunch.config
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/", line 45, in <module>
    import rospkg.distro
  File "/usr/lib/python2.7/dist-packages/rospkg/", line 44, in <module>
    import yaml
  File "/usr/lib/python3/dist-packages/yaml/", line 284
    class YAMLObject(metaclass=YAMLObjectMetaclass):
SyntaxError: invalid syntax
edit retag flag offensive close merge delete


Hey. Were you able to figure this out?

banu gravatar image banu  ( 2017-02-28 23:08:07 -0500 )edit

I think from File "/usr/lib/python2.7 and /usr/lib/python3 appearing in the same error message we can conclude that this is indeed a mixing problem of Python 3 and 2.7. That is never going to work.

gvdhoorn gravatar image gvdhoorn  ( 2017-03-01 02:43:24 -0500 )edit

Thank you so much

banu gravatar image banu  ( 2017-03-03 12:07:27 -0500 )edit