Problem with importing module rospy in python(win10)

9.5k views Asked by At

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?

2

There are 2 answers

0
surya On

Try installing rospy package by

pip install roslibpy
2
Tom McLean On

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