conda-forge / pip-feedstock

A conda-smithy repository for pip.
BSD 3-Clause "New" or "Revised" License
2 stars 21 forks source link

Please consider building 22.0.2 soon. #86

Closed achimgaedke closed 2 years ago

achimgaedke commented 2 years ago

Pip errors out with:

ValueError: HTML doctype missing or incorrect. Expected <!DOCTYPE html>.

Given the conversation https://github.com/pypa/pip/issues/10825#issuecomment-1025250739 and my/worldwide confusion with pip ... I hope that an auto-generated PR comes through soon.

achimgaedke commented 2 years ago

https://github.com/conda-forge/pip-feedstock/pull/87 did the trick, but needs to "trickle through the CDN"...

creating the environment with AWS CodeArtifact as pypi index

name: test
channels:
  - conda-forge
dependencies:
  - pip
  - pip:
    - pip-audit

still fails as it downloads pip-22.0.1 conda package.

$ conda env create -f env.yml -n test
Collecting package metadata (repodata.json): done
Solving environment: done

Downloading and Extracting Packages
[...]

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: \ Ran pip subprocess with arguments:
['/opt/conda-envs/envs/test/bin/python', '-m', 'pip', 'install', '-U', '-r', '/notebooks/condaenv.l1irv4b5.requirements.txt']
Pip subprocess output:
Looking in indexes: https://aws:****@yyy-xxxx.d.codeartifact.ap-southeast-2.amazonaws.com/pypi/pypi/simple/

Pip subprocess error:
ERROR: Exception:
Traceback (most recent call last):
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 165, in exc_logging_wrapper
    status = run_func(*args)
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 339, in run
    requirement_set = resolver.resolve(
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
    result = self._result = resolver.resolve(
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
    if not criterion.candidates:
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
    return bool(self._sequence)
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
    return any(self)
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 44, in _iter_built
    for version, func in infos:
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 294, in iter_index_candidate_infos
    result = self._finder.find_best_candidate(
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 868, in find_best_candidate
    candidates = self.find_all_candidates(project_name)
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 809, in find_all_candidates
    page_candidates = list(page_candidates_it)
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/index/sources.py", line 134, in page_candidates
    yield from self._candidates_from_page(self._link)
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 773, in process_project_url
    page_links = list(parse_links(html_page, self._use_deprecated_html5lib))
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 310, in wrapper_wrapper
    return list(fn(page, use_deprecated_html5lib))
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 351, in parse_links
    parser.feed(page.content.decode(encoding))
  File "/opt/conda-envs/envs/test/lib/python3.10/html/parser.py", line 110, in feed
    self.goahead(0)
  File "/opt/conda-envs/envs/test/lib/python3.10/html/parser.py", line 170, in goahead
    k = self.parse_starttag(i)
  File "/opt/conda-envs/envs/test/lib/python3.10/html/parser.py", line 344, in parse_starttag
    self.handle_starttag(tag, attrs)
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 411, in handle_starttag
    self._raise_error()
  File "/opt/conda-envs/envs/test/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 427, in _raise_error
    raise ValueError(
ValueError: HTML doctype missing or incorrect. Expected <!DOCTYPE html>.

If you believe this error to be incorrect, try passing the command line option --use-deprecated=html5lib and please leave a comment on the pip issue at https://github.com/pypa/pip/issues/10825.

failed

CondaEnvException: Pip failed
achimgaedke commented 2 years ago

Now available and works!