Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip 22.1 and setuptools 62.2.0 break installation with --upgrade --no-binary :all: options #713

Closed
DnPlas opened this issue May 13, 2022 · 7 comments

Comments

@DnPlas
Copy link

DnPlas commented May 13, 2022

Seems like the most recent pip and setuptools versions break the setuptools_scm installation when attempting an install with --upgrade --no-binary :all: options.
The installation process ends with an exception pip._vendor.packaging.markers.UndefinedEnvironmentName: 'extra' does not exist in evaluation environment. and other error messages.

Steps to reproduce

$ python3 -m venv testenv && source testenv/bin/activate
(testenv) $ pip install --upgrade --no-binary :all: setuptools pip
...
Successfully installed pip-22.1 setuptools-62.2.0

(testenv) $ pip install --upgrade --no-binary :all: setuptools_scm
File "/tmp/pip-standalone-pip-cwfeaj42/__env_pip__.zip/pip/_vendor/packaging/markers.py", line 215, in _get_env
          raise UndefinedEnvironmentName(
      pip._vendor.packaging.markers.UndefinedEnvironmentName: 'extra' does not exist in evaluation environment.
      [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: 2
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

NOTE: it is very important to note this only happens when installing using the mentioned options, and also installing pip and setuptools first and then setuptools_scm separately. The project I am working on requires those options to be present, and that way of installing.

Expected behaviour

setuptools_scm is installed with no error messages.

Workaround

Pin pip==22.0.4 and setuptools==62.1.0

DnPlas added a commit to canonical/istio-operators that referenced this issue May 13, 2022
Due to pypa/setuptools_scm#713, we are experiencing errors when building
charms both locally and in the CI. This change will prevent the error
from happening until the GH issue is fixed.
@lathiat
Copy link

lathiat commented May 15, 2022

This seems to happen during the install of the dependency pyparsing, processing

build_reqs = ['railroad-diagrams ; extra == "diagrams"', 'jinja2 ; extra == "diagrams"']

I think this might be fixed by:
pypa/pip@611e925

I think the breaking requirement was introduced by a change to pyparsing released a few days ago in 3.0.9:
pyparsing/pyparsing#360

DnPlas added a commit to DnPlas/katib that referenced this issue May 18, 2022
…tion issues

Due to pypa/setuptools_scm#713, we are experiencing errors when building
charms both locally and in the CI. This change will prevent the error
from happening until the issue is fixed.
DnPlas added a commit to DnPlas/katib that referenced this issue May 18, 2022
…tion issues

Due to pypa/setuptools_scm#713, we are experiencing errors when building
charms both locally and in the CI. This change will prevent the error
from happening until the issue is fixed.
DnPlas added a commit to DnPlas/katib that referenced this issue May 18, 2022
…tion issues

Due to pypa/setuptools_scm#713, we are experiencing errors when building
charms both locally and in the CI. This change will prevent the error
from happening until the issue is fixed.
google-oss-prow bot pushed a commit to kubeflow/katib that referenced this issue May 18, 2022
…tion issues (#1867)

Due to pypa/setuptools_scm#713, we are experiencing errors when building
charms both locally and in the CI. This change will prevent the error
from happening until the issue is fixed.
@DnPlas
Copy link
Author

DnPlas commented May 18, 2022

As @lathiat mentioned, pypa/pip#11112 could fix this issue.
@pradyunsg can I ask if there will be a bug-fix release or if we'll have to wait ~3 months to see those changes reflected in the next release?

@RonnyPfannschmidt
Copy link
Contributor

Would a negative match for the pyparsing version help as downstream workaround

@TimoRoth
Copy link

Installing pip from git master makes thing work for me again, so I'd assume this issue will be gone with the next release of pip.

@DnPlas
Copy link
Author

DnPlas commented May 18, 2022

Would a negative match for the pyparsing version help as downstream workaround

That is a good point, it works for me.

@pradyunsg
Copy link
Member

pradyunsg commented Jun 1, 2022

Is this still relevant? I see a mention for a merged PR.

@TimoRoth
Copy link

TimoRoth commented Jun 1, 2022

A new pip release happened eventually, fixing the issue.

DnPlas added a commit to canonical/istio-operators that referenced this issue Aug 17, 2023
DnPlas added a commit to canonical/istio-operators that referenced this issue Aug 17, 2023
i-chvets pushed a commit to canonical/istio-operators that referenced this issue Sep 25, 2023
NohaIhab added a commit to canonical/kubeflow-dashboard-operator that referenced this issue Sep 28, 2023
DnPlas pushed a commit to canonical/kubeflow-dashboard-operator that referenced this issue Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants