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

Evaluation install fails since the recent flit migration #1776

Closed
martinRenou opened this issue May 16, 2022 · 4 comments · Fixed by #1777
Closed

Evaluation install fails since the recent flit migration #1776

martinRenou opened this issue May 16, 2022 · 4 comments · Fixed by #1777

Comments

@martinRenou
Copy link
Member

Since the recent flit migration #1767, install nbconvert with pip install -e . fails with:

ERROR: Exception:
Traceback (most recent call last):
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 340, in run
    requirement_set = resolver.resolve(
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 75, in resolve
    collected = self.factory.collect_root_requirements(root_reqs)
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 506, in collect_root_requirements
    req = self._make_requirement_from_install_req(
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 468, in _make_requirement_from_install_req
    cand = self._make_candidate_from_link(
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 188, in _make_candidate_from_link
    self._editable_candidate_cache[link] = EditableCandidate(
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 316, in __init__
    super().__init__(
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 161, in __init__
    self.dist = self._prepare()
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 230, in _prepare
    dist = self._prepare_distribution()
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 326, in _prepare_distribution
    return self._factory.preparer.prepare_editable_requirement(self._ireq)
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 543, in prepare_editable_requirement
    dist = _get_prepared_distribution(
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 57, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 45, in prepare_distribution_metadata
    self._install_build_reqs(finder)
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 114, in _install_build_reqs
    conflicting, missing = self.req.build_env.check_requirements(build_reqs)
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_internal/build_env.py", line 178, in check_requirements
    if req.marker is not None and not req.marker.evaluate():
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_vendor/packaging/markers.py", line 304, in evaluate
    return _evaluate_markers(self._markers, current_environment)
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_vendor/packaging/markers.py", line 234, in _evaluate_markers
    lhs_value = _get_env(environment, lhs.value)
  File "/home/martin/micromamba/envs/nbconvert/lib/python3.10/site-packages/pip/_vendor/packaging/markers.py", line 215, in _get_env
    raise UndefinedEnvironmentName(
pip._vendor.packaging.markers.UndefinedEnvironmentName: 'extra' does not exist in evaluation environment.

Is there anything I need to do apart from installing flit?

@blink1073 are we moving away from jupyter_packaging and using flit instead now?

@blink1073
Copy link
Contributor

I'm working on a hatch plugin to replace jupyter-packaging, cf jupyter/notebook#6425

@martinRenou
Copy link
Member Author

Do you have any clue about what is happening currently with the pip install -e .? I am still getting this UndefinedEnvironmentName: 'extra' does not exist in evaluation environment. error and not able to get a working dev nbconvert.

@maartenbreddels
Copy link
Collaborator

I downgraded pip (pip install flit "pip<22") in CI for 1 package, while the other ran fine, not sure why. Could you test this?

@martinRenou
Copy link
Member Author

Thanks for shimming in @maartenbreddels. pip<22 seems to work indeed! It's probably better than me patching my local pip installation (it was actually working too ahah) 😅

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

Successfully merging a pull request may close this issue.

3 participants