First, execute python to check the default python on your raspberry Pi. Press Ctrl-Z to exit.
If it is python3, you can skip this section.
If it is python2, you need execute the following commands to set default python to python3.
- Enter directory /usr/bin
cd /usr/bin - Delete the originalpython link.
sudo rm python - Create new python links to python.
sudo ln -s python3 python - Check python. Press Ctrl-Z to exit.
python