3

I have installed ROS on win10(http://wiki.ros.org/Installation/Windows), and the turtle can also move by pressing the arrow keys. I also installed pybullet through Anaconda3 and used python to import some modules such as

import pybullet as p 
import pybullet_data as pd
import numpy as np
import time

There is no problem in use. But importing rospy

import rospy

does not work, and it prompts "ModuleNotFoundError: No module named'rospy'". why is that? How to solve this problem?

V One
  • 31
  • 1
  • 3

2 Answers2

0

Try installing rospy package by

pip install roslibpy
surya
  • 719
  • 5
  • 13
0

Consindering you are using anaconda, open anaconda prompt and then enter the command:

conda install -c conda-forge ros-rospy

to install the rospy library

Tom McLean
  • 5,583
  • 1
  • 11
  • 36
  • What is not working about it? What is your error? It is still saying it is not installed? – Tom McLean Jun 04 '21 at 10:16
  • There is no problem with the installation according to your method. However, import rospy still reports an error. – V One Jun 04 '21 at 10:20