
Henry Hartley via Mailman-users writes:
This isn't doing a lot for my self-esteem.
I don't think you need to worry about you. :-) There are dozens of moving parts involved, each of which sets its own requirements and is continuously being updated. And you're working in a virtual environment, which is a fragile hack. Works well if you treat it right, but does need care.
I'm now trying to install mailman-web and mailman-hyperkitty. Running the 'pip install' (as documented here https://docs.mailman3.org/en/latest/install/virtualenv.html#installing-web-u...) is giving me a similar setuptools error to the one I got before, although with a different version number: [...] ERROR: Could not find a version that satisfies the requirement setuptools>=61.2 (from versions: none) [...] Requirement already satisfied: setuptools in ./venv/lib/python3.12/site-packages (80.9.0)
There are two ways those two messages can be consistent: that pip's version number parsing is buggy, or those aren't the same pip. The former explanation, while possible, is highly unlikely.
One common explanation for this kind of conflict is that you did part of the installation with the venv active, and part without. I know you wrote that you are "running as the mailman user in venv", but just to double check, does "in" mean "current working directory is venv" or does it mean "venv is activated with '. bin/activate'" as well? You need to activate the venv to get all of the paths (especially to the "pip" and "python" commands) right.
I took a look at a fairly recent install of django-haystack, and in the .dist-info it says the installer is 'pip' rather than 'pip3'. IMO this is bad practice, even today. One possible explanation is that somehow at an intermediate stage the install script is picking up a Python 2 pip, and IIRC Python 2 setuptools goes only to 58.x or 59.x. Or if you're in a Debian environment, I seem to recall the Debian Python 3 environment does not provide setuptools at all (and deliberately makes it hard to install outside of a venv).
Check if your venv bin directory has a pip executable (or symlink to the executable). If not, adding a symlink pip -> pip3 may help.
It seems to be somehow related to the django-haystack package. In fact, running 'pip install django-haystack' results in the same error message. Perhaps I need to take it up with the maintainers of that.
= setuptools 61.2 (probably because it's looking for setuptools somewhere other than your venv, and isn't seeing 80.9.0 at all). I very much doubt that the Haystack developers can help with this more
No, the problem is pip is unable to understand that setuptools 80.9.0 than other experienced Python developers.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan