tried to install sherlock for installing sherlock python 3.6 or more required, i installed python 3.8.2.But the default version is not changed it remain as python 2.7.17.
Just taking the needed part from @George Oyosa's answer
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2
Just execute it and the the command update-alternatives will handle the rest for you.
Here is a link that may help . Check it out: Basically:
Check your existing python version by running:
python -V
or
python --version
List all the available items by running:
ls /usr/bin/python
Now, set your version priorities by issuing the following commands:
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2
You can then list the python priorities by:
update-alternatives --config python
Finally, check your default python version to confirm by repeating the first step!
I have included a screenshot of the same. Check it out. Change Default Python Version Priority.png
Simply open terminal and run "alias python=python3" (without the quotes) then run "python -V" to check
sudo apt install -y python-is-python3
As explain here: Everything you need to know about the switch to Python 3
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.