-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing via venv/pip fails with pip._vendor.packaging.version.InvalidVersion #7836
Comments
I've the same problem on Ubuntu 22 on MS Azure. The final line of the traceback is: pip._vendor.packaging.version.InvalidVersion: Invalid version: '6.5.0-1025-azure' I am told that installation works with pip version 24.0 and fails with pip 24.2. I know that it works with setuptools >= 66, which was where semantic versioning enforcement was turned on for python packages. (Which seems somehow related to the issue.) libera.net's #python seems to think that the problem is |
I am told that this is relevant: |
debian sid :
|
This doesn't look like a pgAdmin issue. Installing with lower pip version works. |
On Fri, 23 Aug 2024 03:51:02 -0700 Aditya Toshniwal ***@***.***> wrote:
This doesn't look like a pgAdmin issue. Installing with lower pip
version works.
This issue should not be closed.
Pgadmin should not use pip's version parsing code to parse the
kernel version, since pip has specific syntax requirements for
version strings. Requirements that the kernel versions do not
conform to.
Pip may have it's own issue, and might, possibly, make the
problem go away. But that does not mean that pgadmin is
calling the library appropriate for parsing kernel version strings.
Regards,
Karl ***@***.***>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
|
pgAdmin isn't parsing any code. It might be some dependency python package. |
If the issue is on pip side, please provide a installation guide via pip with a detailed description which pip-version pgAdmin depends on. |
pgAdmin is released on PyPi since long and there were no issues regarding pip version. Packages like pip may release packages any time even after pgAdmin is released and break things. |
Ok, beside my inofficial page I was following, What can we do? Upstream bug report to pip? Downgrade pip? Is it already solved by the YunoHost-Apps/pgadmin_ynh@65b8094 above? |
On Fri, 30 Aug 2024 04:17:05 -0700 Massimo-B ***@***.***> wrote:
Ok, beside my inofficial page I was following,
this is a bug report against
https://www.pgadmin.org/download/pgadmin-4-python/ as it almost does
the same like my page and is broken as well.
What can we do? Upstream bug report to pip? Downgrade pip? Is it
already solved by the
YunoHost-Apps/pgadmin_ynh@65b8094
above? I just tried again and it still fails.
I was wrong. PGadmin4 is using the platform_version marker correctly,
or at least correctly as far as historical usage goes.
Pip is broken. It may take quite some time for it to be fixed,
since (it seems) there are problems with the specification.
(It seems that using platform_version should, according to the
spec, pretty much never work.)
As written, PGadmin4 will never work with whatever pip releases
are broken in this fashion. That said, there may well be ways
to work-around the problem. (E.g.
adisbladis/nixpkgs@b2da9da)
It occurs to me that one possible work-around might be
to re-order the tests in the requirement specifier
occurring at:
https://github.com/pgadmin-org/pgadmin4/blob/master/pkg/pip/setup_pip.py#L48
_If_ pip's evaluation of requirement specifiers short-circuits
and does not necessarily evaluate all the conditions, then
putting the platform_release test last will solve the problem
on all platforms but that of the ARM64 macOS.
This would go a long way toward mitigating the severity
of the issue.
See also:
https://packaging.python.org/en/latest/specifications/dependency-specifiers/#environment-markers
Regards,
Karl ***@***.***>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
|
You mentioned a possible work-around, that would be a change in pgAdmin4 to work-around the bug in pip? |
On Tue, 03 Sep 2024 23:41:23 -0700 Massimo-B ***@***.***> wrote:
You mentioned a possible work-around, that would be a change in
pgAdmin4 to work-around the bug in pip?
Yes. In the Pgadmin4 packaging.
Someone would have to try it and then submit a pull request.
Isn't that pip bug already
filed as a bug report? I'm not the best person to describe that as
I'm not that much into Python development.
The problem with pip exists because of the pip bug
already referenced having to do with enforcing
python packaging standards. The change that fixed
the pip bug exposed issues in the version comparison
specification. It is unclear what the resolution
will be and whether it will result in a change that
will resolve Pgadmin4's issue.
Regards,
Karl ***@***.***>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
|
I also have this problem. I can't install pgadmin from Postgresql Debian repos.
It happened as soon as my Debian Python upgraded to 3.12. I turned to pip in a virtual environment. I got the same error of this post. It seems pgadmin4 only supports python 3.11 as listed in Pypi page.
I think pgadmin4 should cope with new changes in python3.12. |
Same problem under Debian 12, and surprised that it is still present despite this new version. We are faced with a situation that everyone has been passing the buck for months, I have installed several projects like Odoo or Pretix, and none of them have caused problems. I hope we will have the opportunity to take advantage of a future version ! |
The pip issue linked to above now has another issue attached
which requests that pip requirement specifications be evaluated lazily.
pypa/packaging#834
If this is changed in pip, then re-arranging the requirement
specs of pgadmin4 would greatly mitigate the problem.
I imagine it will take pip some time to address the underlying
issue because it is specification related. Meanwhile it
would be nice to monitor the "lazy" issue and adjust the pgadmin4
packaging when it is resolved.
Or, figure out if there is another way to get the pgadmin4
packaging to have the requirements it needs without bumping
into the pip issue.
|
This can be playable by doing a comparison between version 8.10 and version 8.11. Given the situation, I will immediately stick to it, and I will come back to you with a patch. 😉 |
After research, it is fixed on my side, the culprit is linked to conditions for Darwin environments, the method is not adapted for example for the Python version of Debian 12.
This solution remains a bandage for those who are on a Linux environment, I leave this responsibility to the staff to find a BSD and Linux compatible patch. |
@SIP-Online thank you for the time and the patch |
Re-opening this to see how we can change pgAdmin build code to include this. |
Tested working on archlinuxarm (aarch64-ARCH) |
Tested working on arch linux (6.11.5-arch1-1 x86-64) |
thanks for breaking pip install pgadmin4 :) |
As dev-db/pgadmin4 got removed from Portage due to yarn issues as mentioned in https://bugs.gentoo.org/794460#c20 …
I tried following https://ogris.de/howtos/gentoo-pgadmin4.html to install via venv/pip. But it's failing due to the kernel version?
unames are free form, and expecting it not to contain -gentoo is wrong.
The text was updated successfully, but these errors were encountered: