title |
---|
Installation via Pip |
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.
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.
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:
- https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-cp38-cp38-manylinux_2_31_x86_64.whl
- https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-cp39-cp39-manylinux_2_31_x86_64.whl
- https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-cp310-cp310-manylinux_2_31_x86_64.whl
- https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-cp310-cp310-macosx_12_0_x86_64.whl
- https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-cp310-cp310-macosx_12_0_arm64.whl
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
.
- https://drake-packages.csail.mit.edu/drake/nightly/drake-0.0.20221110-cp38-cp38-manylinux_2_31_x86_64.whl
- https://drake-packages.csail.mit.edu/drake/nightly/drake-0.0.20221110-cp39-cp39-manylinux_2_31_x86_64.whl
- https://drake-packages.csail.mit.edu/drake/nightly/drake-0.0.20221110-cp310-cp310-manylinux_2_31_x86_64.whl
- https://drake-packages.csail.mit.edu/drake/nightly/drake-0.0.20221110-cp310-cp310-macosx_12_0_x86_64.whl
- https://drake-packages.csail.mit.edu/drake/nightly/drake-0.0.20221110-cp310-cp310-macosx_12_0_arm64.whl
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.