How to change the python executable?
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$