0
$\begingroup$

Rosanswers logo

Hi! whenever i try to run ros commands such as roscore or rosmake, it keeps popping up >>

File "/opt/ros/electric/ros/bin/roscore", line 34, in from ros import roslaunch File "/opt/ros/electric/ros/core/roslib/src/ros/init.py", line 55 except roslib.packages.InvalidROSPkgException as e: ^ SyntaxError: invalid syntax

I would b glad if any of you can solve this problem.my default python version is 2.6.6. thanks in advance!


Originally posted by vasp on ROS Answers with karma: 1 on 2011-10-08

Post score: 0


Original comments

Comment by kwc on 2011-10-10:
The syntax error would tend to indicate an older, not newer Python.

Comment by roehling on 2011-10-10:
I just installed Python3.2 (Ubuntu 11.04), ran some ROS stuff with it, and I got an AttributeError exception. So while I agree with Lorenzo that this looks like some sort of Python version conflict, I am unable to reproduce the same error.

Comment by Lorenzo Riano on 2011-10-10:
I think it's due to a Python 2.6 -3 conflict. Röhling maybe you should post your comment as an answer.

Comment by roehling on 2011-10-10:
Are you sure that your ROS binaries actually use Python 2.6? The Syntax Error exception indicates otherwise. Do you have Python 3.x installed?

Comment by vasp on 2011-10-09:
i'm using Ubunthu 10.10 and ros electric package. not only ros core..all the roscommands like rosdep, roswtf also giving me the same error.it was working fine last time. i didnt even update the versions. but since it's not working i tried updating the ubunthu, python version and ros package. but i still hav the same problem.

Comment by Mac on 2011-10-09:
Tell us more; which sort of system are you on?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Are you sure that your ROS binaries actually use Python 2.6? The Syntax Error exception indicates otherwise. Do you have Python 3.x installed? - Röhling (Oct 10)

I think it's due to a Python 2.6 -3 conflict. Röhling maybe you should post your comment as an answer. - Lorenzo Riano (Oct 10)

I just installed Python3.2 (Ubuntu 11.04), ran some ROS stuff with it, and I got an AttributeError exception. So while I agree with Lorenzo that this looks like some sort of Python version conflict, I am unable to reproduce the same error. - Röhling (Oct 10)


Originally posted by Wim with karma: 2915 on 2011-11-18

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.