gkahn13 / badgr

MIT License
148 stars 42 forks source link

class YAMLObject(metaclass=YAMLObjectMetaclass): ^ SyntaxError: invalid syntax #4

Closed lorafei closed 4 years ago

lorafei commented 4 years ago

Hi, when I met the OpenCV problem as the author mentioned at the end of readme.md file, I did as the author told us what to do. However, after exporting PYTHONPATH, I have a new problem like this.

Traceback (most recent call last):
  File "/opt/ros/kinetic/bin/rosparam", line 34, in <module>
    import rosparam
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosparam/__init__.py", line 63, in <module>
    import yaml
  File "/home/jio/anaconda2/envs/badgr/lib/python3.6/site-packages/yaml/__init__.py", line 374
    class YAMLObject(metaclass=YAMLObjectMetaclass):
                              ^
SyntaxError: invalid syntax

I guess there are some incompatible problems between ROS and Python3. I am stuck now. Can anyone help me?

Thanks!

yangXJU commented 4 years ago

Hi, you can change the name of cv2.so

cd /opt/ros/kinetic/lib/python2.7/dist-packages/ sudo mv cv2.so cv2_ros.so

it works on my computer