Skip to content

Latest commit

 

History

History
133 lines (102 loc) · 6.25 KB

pip.md

File metadata and controls

133 lines (102 loc) · 6.25 KB
title
Installation via Pip

Pip Packages

Drake publishes pre-compiled binaries as PyPI wheel packages. Refer to Supported Configurations for additional compatibility details. Drake wheels require a pip version of pip >= 20.3.

To learn about other installation methods, refer to Installation and Quickstart.

If you experience any problems with or have questions about Drake, please ask for help.

Drake binary releases incorporate a pre-compiled version of SNOPT as part of the Mathematical Program toolbox. Thanks to Philip E. Gill and Elizabeth Wong for their kind support.

Drake's pip packages do not support the Gurobi solver. To use Gurobi, you will need to build Drake from source following the instructions in Source Installation.

Stable Releases

For users running on Apple's newer arm64 hardware, Drake does not yet provide native pypi wheels (follow [issue #17906](#17906) for updates). In the meantime, we recommend that you install from a [Direct Download](/from_binary.html#stable-releases) that includes both Python and C++ support, using a dedicated virtual environment.
Drake does not support the Python environment supplied by Anaconda. Before installing or using Drake, please `conda deactivate` (repeatedly, until even the conda base environment has been deactivated) such that none of the paths reported `which -a python python3 pip pip3` refer to conda. Note that Miniconda seems to work fine; it's only Anaconda that has caused problems for some users.
Drake's support for pip has a few known issues (see [issue #15954](#15954)). Please [let us know](/getting_help.html) if you experience any additional problems. To fall back to other installation methods in the meantime, refer to [Installation and Quickstart](/installation.html) for more choices.

We recommend installing drake into a virtual environment directory. In the example below, we will name that directory env, but you can choose any name.

(1) Create a virtual environment and install Drake:

python3 -m venv env
env/bin/pip install --upgrade pip
env/bin/pip install drake

(2) Drake requires certain basic runtime libraries from the host Linux distribution.

For Ubuntu 20.04, install these additional libraries:

sudo apt-get install --no-install-recommends \
  libpython3.8 libx11-6 libsm6 libxt6 libglib2.0-0

For Ubuntu 22.04, install these additional libraries:

sudo apt-get install --no-install-recommends \
  libx11-6 libsm6 libglib2.0-0

For macOS, ensure that you're using Homebrew Python (not Apple's system Python).

(3) Activate the virtual environment:

source env/bin/activate

Refer to Quickstart for next steps.

Nightly Releases

Binary packages of Drake for Ubuntu 20.04 (Focal), Ubuntu 22.04 (Jammy), and Mac x86_64 are generated nightly and are available to download at:

Older packages for specific dates are available by replacing latest with an 8-digit date, e.g., 20221110 for November 10th, 2022. The version number to replace latest with follows the pattern 0.0.YYYYMMDD.

Nightly wheels are retained for 56 days from their date of creation.

To install nightly wheel, install from the URL directly:

# Example for python 3.8 (cp38-cp38).
python3 -m venv env
env/bin/pip install --upgrade pip
env/bin/pip install https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-cp38-cp38-manylinux_2_31_x86_64.whl

Make sure you have the required runtime libraries described above.