
-----Original Message----- From: Stephen J. Turnbull <steve@turnbull.jp> Sent: Thursday, June 12, 2025 08:17 Subject: [MM3-users] Re: Trouble Installing Mailman3
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.
Thanks for your encouraging words.
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.
Here's what I mean when I say I'm doing this "in venv"
I've become the mailman user: sudo su - mailman The .bashrc for that user includes: source /opt/mailman/venv/bin/activate The prompt has (venv) at the left end of it: (venv) mailman@wz-prd-tpmd-1:~$
All pip commands have been run in this state. I did first install setuptools with apt install python3-setuptools and that installed version 68.1.2-2ubuntu1.2.
Note that I'm still not sure the firewall is completely out of the picture, since I do have to include the --trusted-host and --proxy options. Some things install, though, so I think that's OK.
When I do this at the (venv) prompt, asking to install both setuptools and mailman-web:
pip install --proxy http://webproxyta.westat.com:3128 --trusted-host pypi.org setuptools mailman-web
The first line of the output is:
Requirement already satisfied: setuptools in ./venv/lib/python3.12/site-packages (80.9.0)
And that's followed by downloading (or using a cached version) of 11 items before I get the subprocess error.
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.
There is no Python2 on the system so I'm pretty sure it's not that. The pip being used seems to be the right one and pip and pip3 seem to be the same:
(venv) mailman@wz-prd-tpmd-1:~$ pwd /opt/mailman (venv) mailman@wz-prd-tpmd-1:~$ which pip /opt/mailman/venv/bin/pip (venv) mailman@wz-prd-tpmd-1:~$ which pip3 /opt/mailman/venv/bin/pip3 (venv) mailman@wz-prd-tpmd-1:~$ pip -V pip 24.0 from /opt/mailman/venv/lib/python3.12/site-packages/pip (python 3.12) (venv) mailman@wz-prd-tpmd-1:~$ pip3 -V pip 24.0 from /opt/mailman/venv/lib/python3.12/site-packages/pip (python 3.12) (venv) mailman@wz-prd-tpmd-1:~$ cmp venv/bin/pip venv/bin/pip3 (venv) mailman@wz-prd-tpmd-1:~$ pip cache purge Files removed: 44 (venv) mailman@wz-prd-tpmd-1:~$ /opt/mailman/venv/bin/pip install --proxy http://webproxyta.westat.com:3128 --trusted-host pypi.org setuptools mailman-web Requirement already satisfied: setuptools in ./venv/lib/python3.12/site-packages (80.9.0) Collecting mailman-web Downloading mailman_web-0.0.9-py3-none-any.whl.metadata (3.2 kB) Collecting django<4.3,>=4.0 (from mailman-web) Downloading django-4.2.23-py3-none-any.whl.metadata (4.2 kB) Collecting hyperkitty (from mailman-web) Downloading hyperkitty-1.3.12-py3-none-any.whl.metadata (3.6 kB) Collecting postorius (from mailman-web) Downloading postorius-1.3.13-py3-none-any.whl.metadata (2.9 kB) Collecting whoosh (from mailman-web) Downloading Whoosh-2.7.4-py2.py3-none-any.whl.metadata (3.1 kB) Collecting asgiref<4,>=3.6.0 (from django<4.3,>=4.0->mailman-web) Downloading asgiref-3.8.1-py3-none-any.whl.metadata (9.3 kB) Collecting sqlparse>=0.3.1 (from django<4.3,>=4.0->mailman-web) Downloading sqlparse-0.5.3-py3-none-any.whl.metadata (3.9 kB) Collecting django-compressor>=1.3 (from hyperkitty->mailman-web) Downloading django_compressor-4.5.1-py2.py3-none-any.whl.metadata (5.0 kB) Collecting django-extensions>=1.3.7 (from hyperkitty->mailman-web) Downloading django_extensions-4.1-py3-none-any.whl.metadata (6.1 kB) Collecting django-gravatar2>=1.0.6 (from hyperkitty->mailman-web) Downloading django_gravatar2-1.4.5-py2.py3-none-any.whl.metadata (4.3 kB) Collecting django-haystack>=2.8.0 (from hyperkitty->mailman-web) Downloading django_haystack-3.3.0.tar.gz (467 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 467.3/467.3 kB 22.3 MB/s eta 0:00:00 Installing build dependencies ... error error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [2 lines of output] ERROR: Could not find a version that satisfies the requirement setuptools>=61.2 (from versions: none) ERROR: No matching distribution found for setuptools>=61.2 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
-- Henry