Reputation: 306
I am simply trying to build and use pydrake from source. I have seen the Jupyter notebooks on how to use pydrake and they are helpful, but I would like to do this from source on my machine. I am unable to find instructions anywhere on how to build pydrake and use it from source. I have tried bazel build bindings/pydrake
and then run
>>> import pydrake
from within the drake/bindings directory, but I get the error ModuleNotFoundError: No module named 'pydrake.common._module_py'
. What is the usual workflow for building and then using the python bindings?
Upvotes: 3
Views: 1050
Reputation: 2766
You could follow the instruction on https://drake.mit.edu/python_bindings.html#building-the-python-bindings
Namely instead of build drake with bazel, you will need to do
mkdir drake-build
cd drake-build
cmake ../drake
make -j
and then set your PYTHONPATH accordingly.
Upvotes: 4