pip install rospkg没用,应该是这个源里面没有这个包,解决方法如下: pip install --extra-index-url https://rospypi.github.io/simple/ rosbag