On 6/12/25 12:44, Henry Hartley via Mailman-users wrote:

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:~$


So your venv is active. That is good.


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.


Which installed it in some /usr/<maybe local here>/lib/pythonxx/dist-packages or maybe site-packages directory which is probably not goint to be consulted by the python in your venv.

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)

So setuptools 80.9.0 is installed in your venv which is good.

And that's followed by downloading (or using a cached version) of 11 items 
before I get the subprocess error.


(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

The above is collecting mailman-web and its dependencies.

   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.


And this is all from a pip subprocess which is trying to build install build dependencies. I.e., this error is not necessarily related to django-haystack or any other specific package, but is saying it can't find a setuptools package to satisfy the build requirements.

This in turn may be that the subprocess doesn't see your --proxy option.

I think the issue may be that normally pip installs build requirements in an isolated temporary directory so as not to create potential conflicts with installed packages. See <https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#build-isolation>. Specifying --no-build-isolation on the pip command will disable this. See <https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-no-build-isolation>. If you specify --no-build-isolation on the pip command, it should use setuptools and wheel from your venv.

--
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

_______________________________________________
Mailman-users mailing list -- mailman-users@mailman3.org
To unsubscribe send an email to mailman-users-le...@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at: 
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/ZVD6TDFFVJ67RLF2GP3YMVWDKQHEIKP5/

This message sent to arch...@mail-archive.com

Reply via email to