This installs Drake using poetry,
the Python package manager. For an introduction to poetry,
see Basic usage.
The pyproject.toml file found in this directory contains all
that is needed to start a Poetry project using Drake.
First, follow the Installation Instructions to install Poetry using your preferred method.
Run the installation script to perform the following:
- install the required system packages for Drake (Ubuntu only)
- set up your Poetry environment and install Drake
- The
poetry.lockfile listing all dependencies and their versions is not included with this example in order to reduce confusion and keep the version of Drake up to date. It will be created once the environment is set up, and it is encouraged to include this file in your own project's version control in order to manage your project's dependencies.
- The
setup/install_prereqsNote: If you have multiple versions of Python installed,
you can specify the correct version as an optional argument
to the script. For example, to use python3.14, call:
setup/setup_env --python-version 3.14Refer to the Drake installation documentation for the versions of Python officially supported on each OS when installing via PyPI.
To run the particle example tests in this directory,
navigate to src and call the test file to execute the unit tests:
cd src
poetry run python particle_test.pyFor more information on what's available for Drake in Python, see Using Drake from Python and the Python API pydrake.