Use pycharm in ros
I hope to use pycharm in ros and I suffered this problem:
Traceback (most recent call last):
File "/home/pujie/catkin_ws/src/newdetector/script/pointprocess.py", line 3, in <module>
import rospy
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/__init__.py", line 47, in <module>
from std_msgs.msg import Header
File "/opt/ros/kinetic/lib/python2.7/dist-packages/std_msgs/msg/__init__.py", line 1, in <module>
from ._Bool import *
File "/opt/ros/kinetic/lib/python2.7/dist-packages/std_msgs/msg/_Bool.py", line 5, in <module>
import genpy
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/__init__.py", line 34, in <module>
from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 44, in <module>
import yaml
ImportError: No module named yaml
I can run the code by rosrun +package +.py and I noticed there are relative questions [here:https://answers.ros.org/question/204326/pycharm-setup/].
I think my python path is wrong
but i can't set the path in /opt/ros/$ros_release/lib/python2.7/dist-packages
,
How can I config this problem?
Thank you!