The second line mentioned can be changed to
[sudo] update-alternatives --install /usr/bin/python python /usr/bin/python3 10
This gives a priority of 10 for the path of python3
.
The disadvantage of alternatively editing .bashrc
is that using the commands with sudo
will not work.
More Related Contents:
- Pygame already installed; however, python terminal says “No module named ‘pygame’ ” (Ubuntu 20.04.1)
- Getting an “invalid syntax” when trying to perform string interpolation
- How to install python3 version of package via pip on Ubuntu?
- How to set Python’s default version to 3.x on OS X? [duplicate]
- How to upgrade Python version to 3.7? [closed]
- Installed module using pip, not found
- What is “pkg-resources==0.0.0” in output of pip freeze command
- Installing TensorFlow on Windows (Python 3.6.x)
- Why does integer division yield a float instead of another integer?
- What do ellipsis […] mean in a list?
- Reading file using relative path in python project
- Could not load dynamic library ‘cudart64_101.dll’ on tensorflow CPU-only installation
- Is there a ceiling equivalent of // operator in Python?
- PyQt4 to PyQt5 how?
- Python unpacking operator (*)
- Removing the TK icon on a Tkinter window
- Python TypeError: non-empty format string passed to object.__format__
- How do I use a PyGame timer event? How to add a clock to a pygame screen using a timer?
- cleanest way to call one function on a list of items
- Self-reference or forward-reference of type annotations in Python [duplicate]
- ‘ModuleNotFoundError’ when trying to import module from imported package
- Is Python’s order of evaluation of function arguments and operands deterministic (+ where is it documented)?
- How to make a command case insensitive in discord.py
- What does the slash mean when help() is listing method signatures?
- Converting python string into bytes directly without eval()
- How to change all the dictionary keys in a for loop with d.items()?
- Anaconda unicode error on command line startup on Windows
- Issue with regex backreference in Python
- How do I change the volume of the sound or music in PyGame?
- What difference between pickle and _pickle in python 3?