How to install PyBullet Physics Simulation in Windows

Deepak Jogi
4 min readJul 26, 2021

--

PyBullet is a fast and easy-to-use Python module for robotics simulation and machine learning.

Let’s see how to install pybullet on your windows PC.

Before we can install the pybullet we need to make sure that:

  • We have python installed on the PC
  • We can run pip commands for installing python packages
  • We have Microsoft Visual C++build tools

1. Verifying Python installation

Ok let us make sure we have Python and that the expected version is available from your command line.

Open your command-line tool

Now run the command

py --version

If you have python installed you should get some output like Python 3.9.2. Where the number is your current python version.

If you do not have Python, please install the latest 3.x version (2021) from python.org or refer to the Installing Python section of the Hitchhiker’s Guide to Python.

2. Making sure you can run pip commands

Now we need to make sure that pip commands are available. If you installed Python from source, with an installer from python.org, or via Homebrew you should already have pip.

We can check if pip is available by running the command

py -m pip --version

If it doesn’t return a version number of your installed pip , Install it by following any tutorial from the internet. Like this one by Liquid Web.

But like I said if you use windows you probably should already have pip installed.

3. Installing Microsoft Visual Studio Build Tools

This step is often overlooked when trying to install pybullet but this is crucial to the installation.

First, go to the download page for Microsoft Visual Studio Build Tools.

Now scroll down till you see this menu

Open the menu Tools for Visual Studio 2019, Now download Build Tools for Visual Studio 2019

This should download an installer. Open this installer and you should see a window that looks like this.

But if your screen looks like this

Just click on modify to open the first screen.

Okay now make sure that Desktop development with C++ is selected

At the time of writing this article, there is an issue with a component of the Desktop development with C++ package called Windows 10 SDK for me.

So I had to use an earlier version of Windows 10 SDK. To do this open the Individual components tab.

Now scroll down till you find the different versions of Windows 10 SDK and unselect version 10.0.19041.0, version 10.0.16299.0 worked like a charm for me.

Now click on the download/install/modify button, it reads modify for me as I already have it installed.

Modify might also be install/download

That's it now wait till it gets downloaded and installed.

4. Installing Pybullet

Now open cmd again and enter the command

pip install pybullet

This should install pybullet on your PC

You can now import pybullet from your favorite python IDE.

--

--