ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to change the python executable?

asked 2020-08-24 20:21:40 -0500

momin gravatar image

updated 2020-08-26 04:45:21 -0500

gvdhoorn gravatar image

It was getting the python interpreter of anaconda and said that there was no empy. So, I uninstalled anaconda so that it could get the path of my default python in Ubuntu. Still it was the anaconda python as executable python. So, I uninstalled ROS-noetic and installed it again. But still the problem could not be solved.

momin@momin:~$ source /opt/ros/noetic/setup.bash
momin@momin:~$ mkdir -p ~/catkin_ws/src
momin@momin:~$ cd ~/catkin_ws/
momin@momin:~/catkin_ws$ catkin_make
Base path: /home/momin/catkin_ws
Source space: /home/momin/catkin_ws/src
Build space: /home/momin/catkin_ws/build
Devel space: /home/momin/catkin_ws/devel
Install space: /home/momin/catkin_ws/install
####
#### Running command: "cmake /home/momin/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/momin/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/momin/catkin_ws/install -G Unix Makefiles" in "/home/momin/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/momin/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
-- Using PYTHON_EXECUTABLE: /home/momin/anaconda3/bin/python3
-- Using Debian Python package layout
-- 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'
Call Stack (most recent call first):
  /opt/ros/noetic/share/catkin/cmake/all.cmake:164 (include)
  /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:58 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/momin/catkin_ws/build/CMakeFiles/CMakeOutput.log".
Invoking "cmake" failed
momin@momin:~/catkin_ws$
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2020-09-09 01:29:54 -0500

varunbachalli gravatar image

don't worry about changing the python executable.

just do pip install empy

and you may get another error about catkin_pkg

then just do pip install catkin_pkg

edit flag offensive delete link more
0

answered 2022-03-28 13:12:13 -0500

You can specify the python executable during python make with the -DPYTHON_EXECUTABLE flag, like this: catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3

edit flag offensive delete link more

Question Tools

Stats

Asked: 2020-08-24 20:21:40 -0500

Seen: 2,174 times

Last updated: Aug 26 '20