I have installed pybullet with
!pip install pybullet
It shows a warning:
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
But otherwise installed successfully.
However when in later code when I try to import it as
import pybullet as p
It shows the following error:
ModuleNotFoundError: No module named 'pybullet'
How do I fix it?
How are you running the code? The warning pip gave you when you ran pip as root may well be relevant. If you install a library as root with pip, i.e.
Then you may not have access to that library in a Python program you write, unless you run it as root as well.
This being said, pip is correct, you generally should not run it as root. Why don't you just make a new virtual environment for your project, and install pybullet there?