LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   CAnnot install "python" on Sid, so cannot install Virtualbox 6.1 (https://www.linuxquestions.org/questions/debian-26/cannot-install-python-on-sid-so-cannot-install-virtualbox-6-1-a-4175681239/)

273 08-29-2020 07:40 PM

CAnnot install "python" on Sid, so cannot install Virtualbox 6.1
 
I have been waiting around hoping this would be resolved as part of the usual bug fixing but it seems it may just be me seeing this.
After a dist-upgrade the other day when I neglected to pay attention Virtualbox was removed from my system. On trying to reinstall it I saw the following:
Code:

python : PreDepends: python-minimal (= 2.7.17-2) but it is not going to be installed
          Depends: libpython-stdlib (= 2.7.17-2) but it is not going to be installed
          Depends: python2 (= 2.7.17-2) but 2.7.18-2 is to be installed
E: Unable to correct problems, you have held broken packages.

I also found that a script I had for my Blinkstick didn't work as it relied upon the python executable but a quick simlink called python pointing to python2 solved that.
Has anyone else seen somethihng like this? When I google I get no results.
If it doesn't get resolved soon I might resort to trying to download and edit the Virtualbox deb file manually but that's always been a pain to do.

uteck 08-29-2020 09:38 PM

What if you install python3?
Python2 is end of life as the beginning of the year and apps that use it need to switch to python3.
Once you install python3, make sure you are grabbing the latest VB version https://download.virtualbox.org/virt...eoan_amd64.deb

273 08-30-2020 10:47 AM

Quote:

Originally Posted by uteck (Post 6160772)
What if you install python3?
Python2 is end of life as the beginning of the year and apps that use it need to switch to python3.
Once you install python3, make sure you are grabbing the latest VB version https://download.virtualbox.org/virt...eoan_amd64.deb

Thanks. I do have python 3 installed as well -- I get this error when trying to install the package python anyway. I did update my sources.list to point to the Virtualbox Eoan repository jut in case but still the same error.

273 08-31-2020 06:00 PM

I'm still getting this issue and I don't understand as my Python version is higher than the one listed so I was expecting a fix pretty quickly.

HappyTux 08-31-2020 11:49 PM

Quote:

Originally Posted by 273 (Post 6161217)
I'm still getting this issue and I don't understand as my Python version is higher than the one listed so I was expecting a fix pretty quickly.


You miss the = in the line for the packages needed, having a higher version is bad in that case. It needs the exact version it tells you to be able to install. You have two choices try to build the package with the older versions of the library or get the older versions needed and install them with dpkg with the .deb files you download. Or third option now I think about it wait until the package is rebuilt with the new versions of the support libraries. Then it should install without problems.

uteck 09-01-2020 09:48 AM

Found this link discussing Python2 errors in Ubuntu:
https://askubuntu.com/questions/1104...3-is-installed

Looks like python2.7 can be installed with "apt install python2.7" But I can't test that at work.

273 09-01-2020 02:10 PM

Quote:

Originally Posted by HappyTux (Post 6161277)
You miss the = in the line for the packages needed, having a higher version is bad in that case. It needs the exact version it tells you to be able to install. You have two choices try to build the package with the older versions of the library or get the older versions needed and install them with dpkg with the .deb files you download. Or third option now I think about it wait until the package is rebuilt with the new versions of the support libraries. Then it should install without problems.

I had worked out that was the problem but wondered why none of the Debian developers had so wondered whether there was something I was missing.
In the past (for Google Earth, I think) I have modified .deb files to deal with dependency links that are wrong but I don't really want to go messing with "python" in case I mess things up later on once it's fixed.
Luckily I don't need Virtualbox right now but it's been a long time without a fix.

HappyTux 09-01-2020 03:56 PM

Quote:

Originally Posted by 273 (Post 6161510)
I had worked out that was the problem but wondered why none of the Debian developers had so wondered whether there was something I was missing.
In the past (for Google Earth, I think) I have modified .deb files to deal with dependency links that are wrong but I don't really want to go messing with "python" in case I mess things up later on once it's fixed.
Luckily I don't need Virtualbox right now but it's been a long time without a fix.

Probably best python is an important package and not worth messing with. There used to be a site at packages.debian.org that had every package ever built for Debian. Now I check it is still there if needed in the future go there and get what is required. The package you require is sitting there right now.

https://packages.debian.org/search?s...python-minimal

273 09-02-2020 08:56 AM

Quote:

Originally Posted by HappyTux (Post 6161532)
Probably best python is an important package and not worth messing with. There used to be a site at packages.debian.org that had every package ever built for Debian. Now I check it is still there if needed in the future go there and get what is required. The package you require is sitting there right now.

https://packages.debian.org/search?s...python-minimal

Yeah, the problem is if I try to install that what will it uninstall? Weird that the version of python I have isn't listed.

boughtonp 09-02-2020 09:32 AM

Quote:

Originally Posted by 273 (Post 6161742)
Yeah, the problem is if I try to install that what will it uninstall?

Shouldn't your package manager tell you that up front and/or have a dry-run option that simulates without actually doing anything?


HappyTux 09-02-2020 09:34 AM

Quote:

Originally Posted by 273 (Post 6161742)
Yeah, the problem is if I try to install that what will it uninstall? Weird that the version of python I have isn't listed.

I have no idea what it will do when installed the only way to find out is to download the packages and put them at the the end of a dpkg -i install line and see what it tells you it will do, you always get option to say no if not liking results. What I find really weird is the = only for the version number, usually it is a >= to version needed when installing.

Edit: And unless you have deleted your cached packages you always have the versions installed or that have been installed on your machine in there. These can be installed again with the dpkg -i command to go back to a previous state.

boughtonp 09-02-2020 09:53 AM

Quote:

Originally Posted by HappyTux (Post 6161760)
What I find really weird is the = only for the version number, usually it is a >= to version needed when installing.

I'm fairly sure I'd seen mention(s) of 2.7.17 being the last release of Python 2 - that it was EOL and no further development work done after Jan 2020, but then in April 2020, 2.7.18 came out as the last one for real this time.

So it could have been the package maintainer thought there was no point putting >= since they didn't expect another release to happen and/or weren't willing to commit to maintaining it against any future releases.


Anyway, seems like this should be an issue raised in the VirtualBox bug tracker - there do not appear to be any existing tickets mentioning python 2.7.18


HappyTux 09-02-2020 10:31 AM

Quote:

Originally Posted by boughtonp (Post 6161771)
I'm fairly sure I'd seen mention(s) of 2.7.17 being the last release of Python 2 - that it was EOL and no further development work done after Jan 2020, but then in April 2020, 2.7.18 came out as the last one for real this time.

So it could have been the package maintainer thought there was no point putting >= since they didn't expect another release to happen and/or weren't willing to commit to maintaining it against any future releases.


Anyway, seems like this should be an issue raised in the VirtualBox bug tracker - there do not appear to be any existing tickets mentioning python 2.7.18



Could be, but that leaves another mystery, why is that .18 package not listed on the Debian site for every package that has ever been released by them.

273 09-05-2020 11:46 AM

Quote:

Originally Posted by HappyTux (Post 6161780)
Could be, but that leaves another mystery, why is that .18 package not listed on the Debian site for every package that has ever been released by them.

It is very odd, before my previous post I checked "apt policy python2" to make sure I was using the Debian repositories rather than deb-multimedia or something and got:
Code:

python2:
  Installed: 2.7.18-2
  Candidate: 2.7.18-2
  Version table:
 *** 2.7.18-2 500
        500 http://deb.debian.org/debian sid/main amd64 Packages
        100 /var/lib/dpkg/status

What I did not do was "apt policy python" because that gets:
Code:

python:
  Installed: (none)
  Candidate: 2.7.17-2
  Version table:
    2.7.17-2 500
        500 http://deb.debian.org/debian sid/main amd64 Packages
        100 /var/lib/dpkg/status

So, potentially I could uninstall python2 and install python and get things working, however, removing python2 results in the following:
Code:

The following packages will be REMOVED:
  python-all python-all-dev python-cffi-backend python-crypto python-dbus python-decorator python-enum34 python-gi python-ipython-genutils python-keyrings.alt python-numpy python-olefile
  python-pil python-pkg-resources python-prompt-toolkit python-pygments python-setuptools python-six python-traitlets python-wcwidth python-wheel python-xdg python2 python2-dev
0 upgraded, 0 newly installed, 24 to remove and 0 not upgraded.
After this operation, 24.2 MB disk space will be freed.

I'm a little worried installing python might not replace what uninstalling python2 removes.
I get the feeling that this will be resolved eventually but I probably installed python2 due to some dependency and am, one of only a few people with it installed, with most having python installed and being on version 2 anyhow.

HappyTux 09-05-2020 04:05 PM

Quote:

Originally Posted by 273 (Post 6162860)
It is very odd, before my previous post I checked "apt policy python2" to make sure I was using the Debian repositories rather than deb-multimedia or something and got:
Code:

python2:
  Installed: 2.7.18-2
  Candidate: 2.7.18-2
  Version table:
 *** 2.7.18-2 500
        500 http://deb.debian.org/debian sid/main amd64 Packages
        100 /var/lib/dpkg/status

What I did not do was "apt policy python" because that gets:
Code:

python:
  Installed: (none)
  Candidate: 2.7.17-2
  Version table:
    2.7.17-2 500
        500 http://deb.debian.org/debian sid/main amd64 Packages
        100 /var/lib/dpkg/status

So, potentially I could uninstall python2 and install python and get things working, however, removing python2 results in the following:
Code:

The following packages will be REMOVED:
  python-all python-all-dev python-cffi-backend python-crypto python-dbus python-decorator python-enum34 python-gi python-ipython-genutils python-keyrings.alt python-numpy python-olefile
  python-pil python-pkg-resources python-prompt-toolkit python-pygments python-setuptools python-six python-traitlets python-wcwidth python-wheel python-xdg python2 python2-dev
0 upgraded, 0 newly installed, 24 to remove and 0 not upgraded.
After this operation, 24.2 MB disk space will be freed.

I'm a little worried installing python might not replace what uninstalling python2 removes.
I get the feeling that this will be resolved eventually but I probably installed python2 due to some dependency and am, one of only a few people with it installed, with most having python installed and being on version 2 anyhow.

Or you could try apt -s install python and see if they will co-exist. If nothing crazy shows up in the output remove the -s to install.


All times are GMT -5. The time now is 12:54 PM.