ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello @Ivan4815162342,

I think that you have not updated the python interpreter path in VS code.

When I try to run node with this import, rospkg works fine.

In your terminal, you have to type which python then you will get the path of your interpreter.

Now, press Ctrl+Shift+P in VS code and click on Select Interpreter. Try to set the path that you got from your terminal as a python path. I think it will work and solve your problem.

If you are facing issue or any problem feel free to drop commet.

Hello @Ivan4815162342,

I think that you have not updated the python interpreter path in VS code.

When I try to run node with this import, rospkg works fine.

In your terminal, you have to type which python then you will get the path of your interpreter.

Now, press Ctrl+Shift+P in VS code and click on Select Interpreter. Try to set the path that you got from your terminal as a python path. I think it will work and solve your problem.

If you are facing issue or any problem feel free to drop commet. I hope it helps!