pydrake.tutorials ModuleNotFoundError: No module named 'pydrake'
pydrake.tutorials ModuleNotFoundError: No module named 'pydrake'
安装步骤为:
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}
当我尝试 python3 -m pydrake.tutorials
时,我遇到了这个错误:
~/git/drake-build$ python3 -m pydrake.tutorials
/usr/bin/python3: Error while finding module specification for 'pydrake.tutorials' (ModuleNotFoundError: No module named 'pydrake')
当我使用 python3 -c 'import pydrake; print(pydrake.__file__)'
:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pydrake'
export PYTHONPATH=...
步骤必须在同一 command-line 终端中执行,因为稍后会尝试 python3 -m pydrake.tutorials
。也许这就是问题所在?
安装步骤为:
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}
当我尝试 python3 -m pydrake.tutorials
时,我遇到了这个错误:
~/git/drake-build$ python3 -m pydrake.tutorials
/usr/bin/python3: Error while finding module specification for 'pydrake.tutorials' (ModuleNotFoundError: No module named 'pydrake')
当我使用 python3 -c 'import pydrake; print(pydrake.__file__)'
:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pydrake'
export PYTHONPATH=...
步骤必须在同一 command-line 终端中执行,因为稍后会尝试 python3 -m pydrake.tutorials
。也许这就是问题所在?