Score:-1

Setting python version 3.8 as default Ubuntu 20.04

cn flag

Currently when I run python3 --version the out put Python 3.9.1. I have been told that I need python version 3.8 to do what I want (use ros noetic without issues). I have tried to follow a couple of guides online to use python version 3.8, however, nothing works. I have even deleted 3.9.1 files but I still get the same output when checking the version. Don't really get how makes sense.

How can I set the default to 3.8 on Ubuntu 20.04?

Any help would be greatly appreciated!

hu flag
The default is Python 3.8.10, not 3.9.
cc flag
What does the link /usr/bin/python3 point to? Should be /usr/bin/python3.8
ru flag
If you are using Python 3.9.1 in your environment, and you don't have something like `pyenv` setup and you didn't manually install python 3.9.1, then you're not using an Ubuntu release because 3.9.x is only in Hirsute and Impish, and is version 3.9.4 not 3.9.1. Verify you're actually using an Ubuntu release and how you 'installed' Version 3.9.1.
karel avatar
sa flag
Does this answer your question? [How to change python3 path pointer?](https://askubuntu.com/questions/1348089/how-to-change-python3-path-pointer)
Score:1
cn flag

Because you want to work with the ros noetic software, I think the best route is to set up an environment for it in Ubuntu 20.04.

Anaconda is a great way to create multiple software environments that require different packages and setups to make them work.

You can get started by downloading Anaconda (Individual Edition)

https://www.anaconda.com/products/individual

It can be a lengthy download, so allow some time for it to work.

When you get your command prompt again, please run this:

conda create --name ros python=3.8 anaconda

This sets aside an environment named ros that has python 3.8 as your base. It will also download and install a number of compatible tools that work well with python 3.8

To use this environment, you will need to activate it.

conda activate ros

Once you start working in this new environment, your terminal command line will be updated to show (ros) in the prompt.

Anaconda supports the Ros Noetic Desktop Full installation

https://anaconda.org/robostack/ros-noetic-desktop-full

and Ros Noetic Rosbag

https://anaconda.org/robostack/ros-noetic-rosbag

Each page gives you the command to run in your ros environment.

  • The beauty of this is you don't have to settle for one version of python on your system. You only really need it when you're trying to do robot os work. You can even open up another terminal and simultaneously do work in your default (non-conda environment) or activate several conda ros environments on your project.

  • I have several software projects (MongoDB, Superset, Flask web development) that have conflicting or overlapping needs. I make a conda environment for each one and never have to troubleshoot issues related to my software environment.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.