Page 1 of 1

Virtualbox and python3 in ubuntu 20.04

Posted: 4. Oct 2020, 20:13
by edufissure
I have this strange problem: i have upgraded recently from ubuntu 18.04 to 20.04.1 .. Then i had many python2 packages that were orphan and deprecated in ubuntu. So i deleted them.
Uninstallling this packages make that virtualbox was uninstalled also for dependencies.

Then i tried to install again latest version of virttualbox ( 6.1.14) and i got this message:

Code: Select all

eduardo@MiPcLinux:~$ sudo apt install virtualbox-6.1 --simulate
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias       
Leyendo la información de estado... Hecho
Los paquetes indicados a continuación se instalaron de forma automática y ya no son necesarios.
  libgsoap-2.8.91 virtualbox-dkms
Utilice «sudo apt autoremove» para eliminarlos.
Se instalarán los siguientes paquetes adicionales:
  python-is-python2
Los siguientes paquetes se ELIMINARÁN:
  python-is-python3 virtualbox virtualbox-qt
Se instalarán los siguientes paquetes NUEVOS:
  python-is-python2 virtualbox-6.1
0 actualizados, 2 nuevos se instalarán, 3 para eliminar y 0 no actualizados.
Remv python-is-python3 [3.8.2-4]
Remv virtualbox-qt [6.1.10-dfsg-1~ubuntu1.20.04.1]
Remv virtualbox [6.1.10-dfsg-1~ubuntu1.20.04.1]
Inst python-is-python2 (2.7.17-4 Ubuntu:20.04/focal [all])
Inst virtualbox-6.1 (6.1.14-140239~Ubuntu~eoan Oracle Corporation:download.virtualbox.org [amd64])
Conf python-is-python2 (2.7.17-4 Ubuntu:20.04/focal [all])
Conf virtualbox-6.1 (6.1.14-140239~Ubuntu~eoan Oracle Corporation:download.virtualbox.org [amd64])
So i have to turn back to python2.

But if i install virtualbox 6.1.10 from ubuntu repositories, i got no problems, i installed 6.1.10 without any additional problems. Package virtualbox in ubuntu 20.04 from official repositories
Now i wanted to try to upgrade if i was lucky from 61.10 ( ubuntu repo) to 6.1.14 ( oracle repo) but again im facing the problem above ( requires python2 to install vbox latest version from oracle repos).

Is there any way to use python3 only with vbox in Ubuntu 20.04

Thanks

Re: Virtualbox and python3 in ubuntu 20.04

Posted: 4. Oct 2020, 23:48
by scottgus1
Official Virtualbox needs Python 2 for an API. Ubuntu's repository's Virtualbox is a fork, so there's no telling what the fork needs. Ubuntu supports its forks.

Re: Virtualbox and python3 in ubuntu 20.04

Posted: 7. Oct 2020, 11:20
by edufissure
Is there any way to bypass this ?
Its supposed that this python2 API would be replaced by python3 in the near futuree ??

Thanks

Re: Virtualbox and python3 in ubuntu 20.04

Posted: 7. Oct 2020, 16:40
by scottgus1
edufissure wrote:Is there any way to bypass this ?
I don't know about this one, maybe you can set Ubuntu to allow Python 2? There must be business users that still need Python 2 but also want to run 20.04.
edufissure wrote:Its supposed that this python2 API would be replaced by python3 in the near futuree ?
The devs don't tell us when they plan to do things. However, Oracle's paying customers will define when the devs do things to Virtualbox. So when Oracle's customers decide that Virtualbox should drop the Python 2 API, then it will be dropped. Or if Oracle's customers need Python 2, the API will stay.

web-searching "install Python 2 on Ubuntu 2004" is illuminating...

Re: Virtualbox and python3 in ubuntu 20.04

Posted: 2. Dec 2020, 05:32
by RAMChYLD
I think Oracle should look into supporting Python 3. Python 2 has been EOL for 11 months and by January 2021 support will be dropped completely. That's less than one month from now. Distros are encouraged to drop it as it is no longer maintained and poses a serious security hazard, and some like Gentoo are already planning to do so. The others that are clinging on to Python 2 are to post active warnings that it will be a risk to keep using. Virtualbox would do good to start adding Python 3 support and prepare for distros who are planning to drop Python 2.

Re: Virtualbox and python3 in ubuntu 20.04

Posted: 2. Dec 2020, 16:00
by scottgus1
RAMChYLD wrote:I think Oracle should look into supporting Python 3.
A perusal of the Virtualbox manual reveals this:
The Manual wrote:Note: Python version at least 2.6 is required. Python 3 is also supported.
The problem is not that only Python 2 works, for the manual says Python 3 works too. It is that Python 2 also works, and is regarded by Oracle and/or Linux (*) as a reason to install Python 2 as a dependency for Virtualbox.

( * I am not familiar with installers, let alone Linux installers. But either Oracle says 'Python 2 is a dependency', or Linux says 'I can see that Virtualbox uses Python 2 so I'll call out Python 2 as a dependency.' I don't know if either of these can be relaxed. It seems that Oracle could have a "Python 3 only" switch. But the devs would have to do that, as we're all just users on the forum, not Virtualbox developers.

Sine the whole question of Python 2 for Virtualbox is out of the forum's hands, as the devs have to resolve the question, we're going to lock this topic in order to prevent needless repetition. All posters who wish to convince Oracle to stop using Python 2, please know that your views are appreciated, but the forum cannot change Oracle's actions. Please read all responses to the posts above, as some workarounds may be made possible.