Ubuntu 16.04 Rpi
Ubuntu 14.04 (Trusty) and 16.04 (Xenial)
https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get
If you are using Ubuntu 14.04 or 16.04, you can use Felix Krull's deadsnakes PPA at https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
From the comment:
sudo update-alternatives --config python
Will show you an error:
update-alternatives: error: no alternatives for python3
You need to update your update-alternatives , then you will be able to set your default python version.
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.4 1 sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
Then run :
sudo update-alternatives --config python
Set python3.6 as default.
Or use the following command to set python3.6 as default:
sudo update-alternatives --set python /usr/bin/python3.6
Update pip3
FROM ubuntu:16.04
RUN apt update && \
apt install -y python3-pip
ENV PYTHONWARNINGS=ignore:DEPRECATION
RUN pip3 install --upgrade 'pip<21' 'setuptools<51'
RUN pip3 install pyyaml
Install Real Robot
~/realrobot_ws/src/rplidar_ros$ source devel/setup.bash