Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug]: Upgrading to pip 25.3 causes errors in salt-pip #68431

@gee456

Description

@gee456

What happened?

salt salt-3006.16-0

yum -y install salt-master-3006.16-0 salt-minion-3006.16-0

Go to add package with salt-pip and it suggests upgrading to 25.3

[notice] A new release of pip is available: 23.3.2 -> 25.3
[notice] To update, run: /opt/saltstack/salt/bin/python3.10 -m pip install --upgrade pip

after doing so I get the following error for any package I try to install with salt-pip

ERROR: Exception:
Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 107, in _run_wrapper
status = _inner_run()
File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 98, in _inner_run
return self.run(options, args)
File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 662, in wrapper
return func(self, options, args)
File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 85, in wrapper
return func(self, options, args)
File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 458, in run
installed = install_given_reqs(
File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/req/init.py", line 84, in install_given_reqs
requirement.install(
File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 802, in wrapper
return func(
TypeError: InstallRequirement.install() takes from 1 to 7 positional arguments but 8 were given

if I try to rollback that also fails now

/opt/saltstack/salt/bin/python3.10 -m pip install --upgrade pip==23.3.2 --force-reinstall

Collecting pip==23.3.2
Using cached pip-23.3.2-py3-none-any.whl.metadata (3.5 kB)
Using cached pip-23.3.2-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 25.3
Uninstalling pip-25.3:
Successfully uninstalled pip-25.3
Rolling back uninstall of pip
Moving to /opt/saltstack/salt/bin/pip
from /tmp/pip-uninstall-tir8ne_7/pip
Moving to /opt/saltstack/salt/bin/pip3
from /tmp/pip-uninstall-tir8ne_7/pip3
Moving to /opt/saltstack/salt/bin/pip3.10
from /tmp/pip-uninstall-tir8ne_7/pip3.10
Moving to /opt/saltstack/salt/lib/python3.10/site-packages/pip-25.3.dist-info/
from /opt/saltstack/salt/lib/python3.10/site-packages/~ip-25.3.dist-info
Moving to /opt/saltstack/salt/lib/python3.10/site-packages/pip/
from /opt/saltstack/salt/lib/python3.10/site-packages/~ip
ERROR: Exception:
Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 107, in _run_wrapper
status = _inner_run()
File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 98, in _inner_run
return self.run(options, args)
File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 662, in wrapper
return func(self, options, args)
File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 85, in wrapper
return func(self, options, args)
File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 458, in run
installed = install_given_reqs(
File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/req/init.py", line 84, in install_given_reqs
requirement.install(
File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 802, in wrapper
return func(
TypeError: InstallRequirement.install() takes from 1 to 7 positional arguments but 8 were given

To fix salt i have to uninstall and purge the /opt/saltstack folder then reinstall salt

Upgrading to 25.2 is ok, things still work.
/opt/saltstack/salt/bin/python3.10 -m pip install --upgrade pip==25.2

FYI, the reason I upgrade is it warns me I should.
Not upgrading or only upgrading to 25.2 prevents the problem.

Type of salt install

Official rpm

Major version

3006.x

What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)

rockylinux-10

salt --versions-report output

Salt Version:
          Salt: 3006.16

Python Version:
        Python: 3.10.18 (main, Sep  5 2025, 22:48:51) [GCC 11.2.0]

Dependency Versions:
          cffi: 2.0.0
      cherrypy: 18.10.0
  cryptography: 42.0.5
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.6
       libgit2: 1.9.1
  looseversion: 1.0.2
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 24.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: 1.18.2
  python-gnupg: 0.4.8
        PyYAML: 6.0.1
         PyZMQ: 23.2.0
        relenv: 0.20.6
         smmap: Not Installed
       timelib: 0.3.0
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: oracle 9.6
        locale: utf-8
       machine: x86_64
       release: 5.15.0-313.189.5.1.el9uek.x86_64
        system: Linux
       version: Oracle Linux Server 9.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbroken, incorrect, or confusing behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions