Invalid version: 'None' when re-installing/upgrading python-apt using pip when wheel module installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Xenial |
New
|
Undecided
|
Unassigned | ||
Bionic |
New
|
Undecided
|
Unassigned | ||
Focal |
New
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Mantic |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
* It is not possible to upgrade or re-install python-apt using pip from the git+ssh:
* On initial install it also is assigned version `0.0.0` which is incorrect
* This applies to the Mantic, Jammy and earlier versions. It has been fixed in Noble
[ Test Plan ]
* Attempt re-install of python-apt
[ Where problems could occur ]
* Being unable to install python-apt
* Being unable to upgrade python-apt
* Being unable to re-install python-apt
[ Other Info ]
* This been resolved upstream @ https:/
* You can workaround this too by setting environment variable `DEBVER=2.4.11`
* Reproducer
```
❯ python3 -m venv venv
❯ source venv/bin/activate
❯ python3 -m pip list
Package Version
---------- -------
pip 23.2
setuptools 68.1.2
❯ python3 -m pip install --upgrade git+ssh:
Collecting git+ssh:
Cloning ssh://git.
Running command git clone --filter=blob:none --quiet ssh://git.
warning: filtering not recognized by server, ignoring
warning: filtering not recognized by server, ignoring
Running command git checkout -b ubuntu/
Switched to a new branch 'ubuntu/
branch 'ubuntu/
Resolved ssh://git.
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: python-apt
Building wheel for python-apt (pyproject.toml) ... done
Created wheel for python-apt: filename=
Stored in directory: /tmp/pip-
Successfully built python-apt
Installing collected packages: python-apt
Successfully installed python-apt-0.0.0
❯ python3 -m pip list
Package Version
---------- -------
pip 23.2
python-apt 0.0.0
setuptools 68.1.2
# install wheel
❯ python3 -m pip install wheel
Collecting wheel
Obtaining dependency information for wheel from https:/
Using cached wheel-0.
Using cached wheel-0.
Installing collected packages: wheel
Successfully installed wheel-0.42.0
❯ python3 -m pip list
Package Version
---------- -------
pip 23.2
python-apt 0.0.0
setuptools 68.1.2
wheel 0.42.0
# Now try re-install
❯ python3 -m pip install --upgrade git+ssh:
Collecting git+ssh:
Cloning ssh://git.
Running command git clone --filter=blob:none --quiet ssh://git.
warning: filtering not recognized by server, ignoring
warning: filtering not recognized by server, ignoring
Running command git checkout -b ubuntu/
Switched to a new branch 'ubuntu/
branch 'ubuntu/
Resolved ssh://git.
Preparing metadata (setup.py) ... error
error: subprocess-
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [34 lines of output]
Traceback (most recent call last):
File "/tmp/venv/
return str(packaging.
File "/tmp/venv/
raise InvalidVersion(
setuptool
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptool
File "/tmp/pip-
File "/tmp/venv/
return distutils.
File "/tmp/venv/
File "/tmp/venv/
File "/tmp/venv/
File "/tmp/venv/
return str(packaging.
File "/tmp/venv/
raise InvalidVersion(
setuptool
W: [python3.1] DistUtilsExtra import error.
W: [python3.1] Sphinx import error.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
# Now install the upstream version with the fix
❯ python3 -m pip install --upgrade git+https:/
Collecting git+https:/
Cloning https:/
Running command git clone --filter=blob:none --quiet https:/
Running command git checkout -b 2.4.y --track origin/2.4.y
Switched to a new branch '2.4.y'
branch '2.4.y' set up to track 'origin/2.4.y'.
Resolved https:/
Preparing metadata (setup.py) ... done
Building wheels for collected packages: python-apt
Building wheel for python-apt (setup.py) ... done
Created wheel for python-apt: filename=
Stored in directory: /tmp/pip-
Successfully built python-apt
Installing collected packages: python-apt
Attempting uninstall: python-apt
Found existing installation: python-apt 0.0.0
Uninstalling python-apt-0.0.0:
Successfully uninstalled python-apt-0.0.0
Successfully installed python-apt-2.4.0
# Now remove wheel
❯ python3 -m pip uninstall -y wheel
Found existing installation: wheel 0.42.0
Uninstalling wheel-0.42.0:
Successfully uninstalled wheel-0.42.0
# Try re-install again without wheel present in virtual env
❯ python3 -m pip install --upgrade git+ssh:
Collecting git+ssh:
Cloning ssh://git.
Running command git clone --filter=blob:none --quiet ssh://git.
warning: filtering not recognized by server, ignoring
warning: filtering not recognized by server, ignoring
Running command git checkout -b ubuntu/
Switched to a new branch 'ubuntu/
branch 'ubuntu/
Resolved ssh://git.
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: python-apt
Building wheel for python-apt (pyproject.toml) ... done
Created wheel for python-apt: filename=
Stored in directory: /tmp/pip-
Successfully built python-apt
Installing collected packages: python-apt
Attempting uninstall: python-apt
Found existing installation: python-apt 2.4.0
Uninstalling python-apt-2.4.0:
Successfully uninstalled python-apt-2.4.0
Successfully installed python-apt-0.0.0
```
description: | updated |
Ubuntu 23.10 (Mantic Minotaur) has reached end of life, so this bug will not be fixed for that specific release.