You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with a sufficiently old version of virtualenv the yanked metadata isn't handled and the salt module will error with:
ID: ensure somepackage python virtualenv
Function: virtualenv.managed
Name: /usr/local/venv/somepackage
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/state.py", line 2154, in call
*cdata["args"], **cdata["kwargs"]
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2106, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/states/virtualenv_mod.py", line 298, in managed
before = set(__salt__["pip.freeze"](bin_env=name, user=user, use_vt=use_vt))
File "/usr/lib/python3/dist-packages/salt/modules/pip.py", line 1209, in freeze
cur_version = version(bin_env, cwd)
File "/usr/lib/python3/dist-packages/salt/modules/pip.py", line 1336, in version
raise CommandNotFoundError("Could not find a `pip` binary")
salt.exceptions.CommandNotFoundError: Could not find a `pip` binary
the setuptools people will probably publish a new not broken version soon and this won't be a problem anymore, but in the mean time I wanted to report this here in case people are running into this issue and are looking for answers on google.
The text was updated successfully, but these errors were encountered:
Thanks for this, I've just been debugging the same thing for the past couple of hours and came to the exact same conclusion (and solution) as you. Appreciate the time you've taken to document this, and glad it wasn't just me. :)
We noticed that this setuptools issue pypa/setuptools#3002 also affected the pip module in saltstack today:
salt/salt/modules/pip.py
Line 165 in 22d5aee
with a sufficiently old version of virtualenv the yanked metadata isn't handled and the salt module will error with:
for something like:
because it does
python -m pip
.a temporary workaround is to pin setuptools to
60.2.0
manually before usingvirtualenv.managed
to install any pip pkgs:the setuptools people will probably publish a new not broken version soon and this won't be a problem anymore, but in the mean time I wanted to report this here in case people are running into this issue and are looking for answers on google.
The text was updated successfully, but these errors were encountered: