[Bug] it says import not found when I import rospy

This is an error report.


Screenshot of the error


Error details

Title

There is a syntax error in your code (most likely after you copied and pasted it). Please share a screenshot showing your code in the IDE, so we can see how to help you.

Hi @abhale221,

it seems that your Python script is being interpreted as a bash/Linux script.

To make it be interpreted as Python, please add the following code in the first line of your file:

#!/usr/bin/env python

Please let us know if this solves the problem.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.