Home > Enterprise >  pydrake.tutorials ModuleNotFoundError: No module named 'pydrake'
pydrake.tutorials ModuleNotFoundError: No module named 'pydrake'

Time:04-15

Installation steps were:

git clone https://github.com/RobotLocomotion/drake.git
mkdir drake-build
cd drake-build
cmake -DWITH_GUROBI=ON -DWITH_MOSEK=ON ../drake
make -j4
cd drake-build
export PYTHONPATH=${PWD}/install/lib/python3.8/site-packages:${PYTHONPATH}

When I try python3 -m pydrake.tutorials I have got this error:

~/git/drake-build$ python3 -m pydrake.tutorials
/usr/bin/python3: Error while finding module specification for 'pydrake.tutorials' (ModuleNotFoundError: No module named 'pydrake')

And when i use python3 -c 'import pydrake; print(pydrake.__file__)':

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pydrake'

CodePudding user response:

The export PYTHONPATH=... step must be performed in the same command-line terminal as python3 -m pydrake.tutorials is later attempted. Maybe that was the problem?

  • Related