how can i change the python path
so this the whole error but i figured that maybe if i change the python path it will solve the problem but i dont know how i want to change from python 3 to 2.7 i don't know why it is searching in python 3 so can anyone help with the steps since i am new to ubunt 16.04 and ros i just want to change the python path.
at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/usr/bin/python3
"/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
"/opt/ros/kinetic/share/catkin/cmake/../package.xml"
"/home/evadro/catkin_ws/build/catkin/catkin_generated/version/package.cmake")
returned error code 1
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake:74 (safe_execute_process)
/opt/ros/kinetic/share/catkin/cmake/all.cmake:168 (_catkin_package_xml)
/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:56 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/evadro/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/evadro/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
Asked by GP202-DAR on 2020-02-06 04:51:59 UTC
Answers
What is the output of python --version
in your system ?
list all pythons on your system
ls /usr/bin/python*
and then use alias in ~/.bashrc file to change default python in your system with ;
alias python='/usr/bin/python2.7'
also source ~./bashrc
, afteryou added above line
Asked by Fetullah Atas on 2020-02-06 20:31:16 UTC
Comments
python --version Python 2.7.13 evadro@evadro-PowerEdge-T620:~$ ls /usr/bin/python* /usr/bin/python /usr/bin/python3.5-config /usr/bin/python2 /usr/bin/python3.5m /usr/bin/python2.7 /usr/bin/python3.5m-config /usr/bin/python2.7-config /usr/bin/python3-config /usr/bin/python2-config /usr/bin/python3m /usr/bin/python3 /usr/bin/python3m-config /usr/bin/python3.5 /usr/bin/python-config evadro@evadro-PowerEdge-T620:~$ alias python='/usr/bin/python2.7' evadro@evadro-PowerEdge-T620:~$ source ~./bashrc bash: ~./bashrc: No such file or directory evadro@evadro-PowerEdge-T620:~$ ~/.bashrc /home/evadro/.bashrc: line 8: return: can only `return' from a function or sourced script /home/evadro/.bashrc: line 119: /home/evadro/catkin_ws/devel/setup.bash: No such file or directory /home/evadro/.bashrc: line 124: /home/evadro/catkin_ws/devel/setup.bash: No such file or directory /home/evadro/.bashrc: line 125: /home/evadro/catkin_ws/devel/setup.bash: No
Asked by GP202-DAR on 2020-02-09 03:12:51 UTC
this is the output.i think i have problem with bashrc file
Asked by GP202-DAR on 2020-02-09 03:13:45 UTC
and another information i build ros from source is it the problem do you think the problem is there
Asked by GP202-DAR on 2020-02-09 03:19:15 UTC
I believe I ran into this problem too. Since lsb_release now automatically installs python3 on 16.04, the catkin_make executable sees that it exists and then tries to use it with incomplete dependencies.
I have found 2 solutions to this:
Install the required python3 libraries for catkin_make to work
sudo apt-get install python3-pip python3-yaml
sudo pip3 install rospkg catkin_pkg
catkin_make
OR
Use catkin build tools and specify the python version you want to use for compiling
sudo apt-get install python-catkin-tools
catkin build -DPYTHON_VERSION=2.7
Asked by athackst on 2020-03-08 15:24:18 UTC
Comments
Is this a duplicate of #q343428?
Asked by gvdhoorn on 2020-02-06 05:30:10 UTC