Recently, I upgraded my python from 2.7 to 3.6.10.By using $sudo apt-get install python3.6 then, sudo update-alternatives --install … , then sudo update-alternatives … And eventually, when I type $python -V, the return is “Python 3.6.10”.
However, I realised a huge issue, all the ros dependencies are misssing. E.g when I do roslaunch, I have "ModuleNotFoundError: No module named ‘roslaunch’ ". Is there any way to solve this probelm, or is there any method to role back entire ubuntu to a few days ago.
ROS uses python 2.7, getting it to run on python3 is very difficult. However, python 2.7 is still on your system. instead of starting ‘python’ start ‘python2’. You can also google on how to change your default python back to 2.7. If you do that, just typing ‘python’ will be python2 and you need to specify ‘python3’ if you want to use that.
Hi, thank you very much for the advice. I will do that in my new ubuntu system. I re-installed everything. I should have ask here earlier before I upgraded python. Lesson learned for me.