Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Upgrading Python on Ubuntu 22.04.1 LTS

211 views
Skip to first unread message

אורי

unread,
Feb 1, 2023, 11:32:26 AM2/1/23
to
Hi,

I have a server with Ubuntu 22.04.1 LTS and the Python version there
is Python 3.10.6. Is there a safe way to upgrade to the latest version of
Python 3.10 (3.10.9)? I tried with the OS update and upgrade but the Python
version remained the same.

Thanks,
אורי
u...@speedy.net

Grant Edwards

unread,
Feb 1, 2023, 11:43:20 AM2/1/23
to
On 2023-02-01, אורי <u...@speedy.net> wrote:

> I have a server with Ubuntu 22.04.1 LTS and the Python version there
> is Python 3.10.6. Is there a safe way to upgrade to the latest version of
> Python 3.10 (3.10.9)? I tried with the OS update and upgrade but the Python
> version remained the same.

This is an Ubuntu question, not a Python question.

But, the answer is that you generally shouldn't mess with the Python
version installed by apt on Ubuntu. There are too many other packages
that use it.

It may be safest to install mutliple versions:

https://ubuntuhandbook.org/index.php/2022/10/python-3-11-released-how-install-ubuntu/

You can also use Anaconda to do something similar:

https://askubuntu.com/questions/1413421/how-to-install-older-version-of-python-in-ubuntu-22-04





Skip Montanaro

unread,
Feb 1, 2023, 12:11:53 PM2/1/23
to
>
>
> I have a server with Ubuntu 22.04.1 LTS and the Python version there
> is Python 3.10.6. Is there a safe way to upgrade to the latest version of
> Python 3.10 (3.10.9)? I tried with the OS update and upgrade but the Python
> version remained the same.
>
> I have an Ubuntu 22.04 system. The installed Python 3.10 version is 3.10.7:

$ apt search python3 | egrep '^python3.10.*installed'


WARNING: apt does not have a stable CLI interface. Use with caution in
scripts.


python3.10/now 3.10.7-1+focal1 amd64 [installed,local]
python3.10-distutils/now 3.10.7-1+focal1 all [installed,local]
python3.10-doc/jammy-updates,jammy-security,now 3.10.6-1~22.04.2 all
[installed]
python3.10-gdbm/now 3.10.7-1+focal1 amd64 [installed,local]
python3.10-lib2to3/now 3.10.7-1+focal1 all [installed,local]
python3.10-minimal/now 3.10.7-1+focal1 amd64 [installed,local]
python3.10-venv/now 3.10.7-1+focal1 amd64 [installed,local]


Off the top of my head, I can't recall if it's LTS or not. If you want to
go beyond 3.10.6, it should be possible. As Grant indicated though,
upgrading packages on an Ubuntu system (of any flavor) is the province of
the Ubuntu community.

Skip

Chris Angelico

unread,
Feb 1, 2023, 12:14:48 PM2/1/23
to
‪On Thu, 2 Feb 2023 at 03:33, ‫אורי‬‎ <u...@speedy.net> wrote:‬
>
> Hi,
>
> I have a server with Ubuntu 22.04.1 LTS and the Python version there
> is Python 3.10.6. Is there a safe way to upgrade to the latest version of
> Python 3.10 (3.10.9)? I tried with the OS update and upgrade but the Python
> version remained the same.

First, ask: Do you need to? Often patches get backported, but the
version number isn't changed. Find out if there's something fixed in
3.10.9 that still isn't fixed in the version Ubuntu is shipping.

ChrisA

Jack Dangler

unread,
Feb 1, 2023, 12:25:11 PM2/1/23
to
Ari

Have you tried running a snap update?

Regards

יַעֲקֹב

On 2/1/23 11:31, אורי wrote:
> Hi,
>
> I have a server with Ubuntu 22.04.1 LTS and the Python version there
> is Python 3.10.6. Is there a safe way to upgrade to the latest version of
> Python 3.10 (3.10.9)? I tried with the OS update and upgrade but the Python
> version remained the same.
>
> Thanks,
> אורי
> u...@speedy.net

אורי

unread,
Feb 1, 2023, 12:37:46 PM2/1/23
to
Thank you all.

I'm not familiar with snap update but I did `sudo apt update` & `sudo apt
upgrade`, but about one or two months ago.

אורי
u...@speedy.net
> --
> https://mail.python.org/mailman/listinfo/python-list
>

Thomas Passin

unread,
Feb 1, 2023, 1:13:37 PM2/1/23
to
On 2/1/2023 12:36 PM, אורי wrote:
> Thank you all.
>
> I'm not familiar with snap update but I did `sudo apt update` & `sudo apt
> upgrade`, but about one or two months ago.
>
> אורי
> u...@speedy.net

You can probably install it from the deadsnakes repository:

sudo add-apt-repository ppa:deadsnakes/ppa

More than likely it will have your package. See

https://github.com/deadsnakes

Jack Dangler

unread,
Feb 1, 2023, 1:38:12 PM2/1/23
to
If you're not familiar with snap, lookup 'snap' 'ubuntu' ...

Thomas Passin

unread,
Feb 1, 2023, 1:53:19 PM2/1/23
to
On 2/1/2023 1:37 PM, Jack Dangler wrote:
> If you're not familiar with snap, lookup 'snap' 'ubuntu' ...

Many people would rather avoid snap if possible ...

אורי

unread,
Feb 2, 2023, 1:57:28 PM2/2/23
to
deadsnakes ppa don't have Python 3.10 for Ubuntu 22.04.

https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
אורי
u...@speedy.net
> --
> https://mail.python.org/mailman/listinfo/python-list
>

Thomas Passin

unread,
Feb 2, 2023, 3:13:30 PM2/2/23
to
On 2/2/2023 1:56 PM, אורי wrote:
> deadsnakes ppa don't have Python 3.10 for Ubuntu 22.04.
>
> https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
> <https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa>
> אורי
> u...@speedy.net <mailto:u...@speedy.net>

I just last night installed 3.10.9 on Debian Buster following the
directions at

https://computingforgeeks.com/how-to-install-python-latest-debian/

I only changed the file name of the Python tarball. However, if you want
to use tkinter, the Tk development libraries need to be on your machine
before you run ./configure. The package name may change, but for me it was

sudo apt-get install tk-dev

(see
https://stackoverflow.com/questions/5459444/tkinter-python-may-not-be-configured-for-tk)

It does not replace the Debian Python3 link to 3.7.3 so it should not
interfere with normal Debian system services.

(The highest Debian-supported version of Python on Buster is still 3.7+).

> On Wed, Feb 1, 2023 at 8:14 PM Thomas Passin <li...@tompassin.net
> <mailto:li...@tompassin.net>> wrote:
>
> On 2/1/2023 12:36 PM, אורי wrote:
> > Thank you all.
> >
> > I'm not familiar with snap update but I did `sudo apt update` &
> `sudo apt
> > upgrade`, but about one or two months ago.
> >
> > אורי
> > u...@speedy.net <mailto:u...@speedy.net>
>
> You can probably install it from the deadsnakes repository:
>
> sudo add-apt-repository ppa:deadsnakes/ppa
>
> More than likely it will have your package.  See
>
> https://github.com/deadsnakes <https://github.com/deadsnakes>
>
>
>
> > On Wed, Feb 1, 2023 at 7:33 PM Jack Dangler <tdl...@gmail.com
> <mailto:tdl...@gmail.com>> wrote:
> >
> >> Ari
> >>
> >> Have you tried running a snap update?
> >>
> >> Regards
> >>
> >> יַעֲקֹב
> >>
> >> On 2/1/23 11:31, אורי wrote:
> >>> Hi,
> >>>
> >>> I have a server with Ubuntu 22.04.1 LTS and the Python version
> there
> >>> is Python 3.10.6. Is there a safe way to upgrade to the latest
> version of
> >>> Python 3.10 (3.10.9)? I tried with the OS update and upgrade
> but the
> >> Python
> >>> version remained the same.
> >>>
> >>> Thanks,
> >>> אורי
> >>> u...@speedy.net <mailto:u...@speedy.net>
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list
> <https://mail.python.org/mailman/listinfo/python-list>
>

0 new messages