ubuntu20.04出現现実行可能ファイル「empy」またはPythonモジュール「em」が見つかりません...試してください

ubuntu20.04出現现実行可能ファイル「empy」またはPythonモジュール「em」が見つかりません…試してください

質問

コマンドを実行するcatkin_makeと以下のエラーが発生します

-- Could NOT find PY_em (missing: PY_EM) 
CMake Error at /opt/ros/noetic/share/catkin/cmake/empy.cmake:30 (message):
  Unable to find either executable 'empy' or Python module 'em'...  try
  installing the package 'python3-empy'

これは、catkin探している Python のバージョンが anaconda より下のバージョンであるため、代わりに次のコマンドを指定する必要があるためです。

解決
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3

私のものはubuntu20.04であるため、組み込みのPythonバージョンは3.xであり、ubuntuの下位バージョンにはPythonバージョン2.xが含まれている可能性があるため、上記のコマンドを次のように変更する必要がありpython3ますpython2

おすすめ

転載: blog.csdn.net/weixin_48319333/article/details/129640885