How Do I Install a Specific Version of Python in Ubuntu?
Contents

How do I install a specific version of a Python module?

If you want to install it on the 3. x version you need to call the command as “python3 -m pip install “. On Debian/Ubuntu, pip is the command to use when installing packages for Python 2, while pip3 is the command to use when installing packages for Python 3.

How do I change python to 2.7 in Ubuntu?

8 as the default in Ubuntu 18.04 from Python 2.7 you can try the command line tool update-alternatives . Change the path /usr/bin/python3 to your desired python version accordingly.

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest