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

Lxml 5.1.1 is breaking requirements installation #2468

Closed
Danyal-Faheem opened this issue May 7, 2024 · 1 comment
Closed

Lxml 5.1.1 is breaking requirements installation #2468

Danyal-Faheem opened this issue May 7, 2024 · 1 comment

Comments

@Danyal-Faheem
Copy link

While installing the docker image using tutor-credentials nightly, the image build fails during the requirements installation step. The error is:

 WARNING: lxml 5.1.1 does not provide the extra 'html-clean'
 WARNING: lxml 5.1.1 does not provide the extra 'html_clean'
 ERROR: Exception:
 Traceback (most recent call last):
   File "/openedx/venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
     status = run_func(*args)
   File "/openedx/venv/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
     return func(self, options, args)
   File "/openedx/venv/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 377, in run
     requirement_set = resolver.resolve(
   File "/openedx/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
     result = self._result = resolver.resolve(
   File "/openedx/venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
     state = resolution.resolve(requirements, max_rounds=max_rounds)
   File "/openedx/venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 427, in resolve
     failure_causes = self._attempt_to_pin_criterion(name)
   File "/openedx/venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 249, in _attempt_to_pin_criterion
     satisfied = all(
   File "/openedx/venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 250, in <genexpr>
     self._p.is_satisfied_by(requirement=r, candidate=candidate)
   File "/openedx/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 240, in is_satisfied_by
     return requirement.is_satisfied_by(candidate)
   File "/openedx/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/requirements.py", line 83, in is_satisfied_by
     assert candidate.name == self.name, (
 AssertionError: Internal issue: Candidate is not for this requirement lxml[html-clean,html-clean] vs lxml[html-clean]

This is likely because Lxml 5.1.1 is being installed which does not contain the html-clean extra.

Lxml 5.2.1 should be the package being installed here instead but the requirements do not list it as such because of the constraint

# Pinning lxml to < 5.2 as edx-i18n-tools package needs to be updated.
# Release notes: https://pypi.org/project/lxml/5.2.0/
# Github issue: https://github.com/openedx/i18n-tools/issues/144
lxml<5.2

that was pinned in #2430. edx-i18n-tools has been updated as per this PR and it is safe to remove the constraint now.

@Danyal-Faheem
Copy link
Author

Closing this issue since upgrading the setuptools, pip, wheel versions in the tutor-credentials Dockerfile fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant