CMake Error at /opt/ros/melodic/share/catkin/cmake/safe_execute_process.cmake:11 (message): execut

CMake Error at /opt/ros/melodic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/usr/bin/python
  "/tmp/QtCreator-XzPzFL/qtc-cmake-iCElsmaa/catkin_generated/generate_cached_setup.py")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/melodic/share/catkin/cmake/all.cmake:208 (safe_execute_process)
  /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:15 (find_package)

与Python兼容问题(No module catkin_dkg.package)
解决办法
检查一下Python的版本: wgb@wgb:~$ python -V
检查一下catkin依赖的Python版本: wgb@wgb:~$ dpkg -L python-catkin-pkg
如果Python的版本和catkin依赖的版本不一样,说明Python依赖包有问题,解决办法:

conda install setuptools
pip install -U rosdep rosinstall_generator wstool rosinstall six vcstools

以上参考
https://blog.csdn.net/wuguangbin1230/article/details/77803017

安装canda

pip install conda

遇到问题:
error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for conda
  Running setup.py clean for conda
  Running setup.py bdist_wheel for pycosat ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-cOYzY2/pycosat/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpqpiY9Spip-wheel- --python-tag cp27:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for pycosat
  Running setup.py clean for pycosat
Failed to build conda pycosat
Installing collected packages: pycosat, urllib3, chardet, certifi, idna, requests, ruamel.ordereddict, ruamel.yaml.clib, ruamel.yaml, enum34, conda
  Running setup.py install for pycosat ... done
  Running setup.py install for conda ... done
Successfully installed certifi-2020.6.20 chardet-3.0.4 conda-4.3.16 enum34-1.1.10 idna-2.10 pycosat-0.6.3 requests-2.24.0 ruamel.ordereddict-0.4.14 ruamel.yaml-0.16.10 ruamel.yaml.clib-0.2.0 urllib3-1.25.10

解决办法:

pip install wheel
pip install --upgrade setuptools
pip install pycosat

pip install conda

若不行,
https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D
下载相应版本Anaconda3

chmod 777 xxx.sh #给执行权限
bash xxx.sh#安装
source ~/.bashrc
然后
conda install setuptools
pip install -U rosdep rosinstall_generator wstool rosinstall six vcstools

你可能感兴趣的:(cmake)