> For the complete documentation index, see [llms.txt](https://quantum-computing.gitbook.io/introduction-to-quantum-computing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://quantum-computing.gitbook.io/introduction-to-quantum-computing/which-tools-do-you-use/python-virtual-env-and-jupyter/update-python-version.md).

# Update Python Version

@Glimpse Here is a short tutorial to update your python version 3.10

@page   [\[ How To Install Python 3.10 on Ubuntu 20.04|18.04 \]](https://computingforgeeks.com/how-to-install-python-on-ubuntu-linux-system/)

lets start with&#x20;

```
sudo apt update
sudo apt install python3.9
```

You can call this python version now in the terminal with $python3.9 but it is not the main python version on your system,yet. $ **`python3 --version`**&#x20;

**`will give you the old version, because it is the "first" python on your system. We have to change it to the right alternative version.`**\
\
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.\[old-version] 1

Now we add the new version as an alternative\
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 2

type the following command to configure the priority status of the versions:

```
sudo update-alternatives --config python3
```

\
with the terminal output<br>

![\[ source \]](https://4092223458-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjY9ZUOIiOq3c33tSsV%2Fuploads%2FjUcHlDkrVmzNd9yiZWhp%2Fimage.png?alt=media\&token=c0aedac7-3cbe-4573-9af2-f855c4d8b944)

If you are not planning to use the old version of Python, remove the [symlink](https://phoenixnap.com/kb/symbolic-link-linux) that contained the previous Python 3 version with:

$ sudo rm /usr/bin/python3

and create a new symlink:

sudo ln -s python3.9 /usr/bin/python3

python3 --version

you are done. READY to rock python!
