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: failed when running ./tools/vscode/refresh_compdb.sh #15754

Closed
qinggniq opened this issue Mar 30, 2021 · 4 comments
Closed

pip: failed when running ./tools/vscode/refresh_compdb.sh #15754

qinggniq opened this issue Mar 30, 2021 · 4 comments

Comments

@qinggniq
Copy link
Contributor

qinggniq commented Mar 30, 2021

Title: failed when running ./tools/vscode/refresh_compdb.sh

Description:

$ git pull upstream main
$ ./tools/vscode/refresh_compdb.sh
INFO: Repository pylint_pip3 instantiated at:
  /data/envoy-learn/istio/envoy/WORKSPACE:17:25: in <toplevel>
  /data/envoy-learn/istio/envoy/bazel/repositories_extra.bzl:124:17: in envoy_dependencies_extra
  /data/envoy-learn/istio/envoy/bazel/repositories_extra.bzl:81:16: in _python_deps
  /data/.cache/envoy-compdb/_bazel_wangcong01/b938f25908549f924e43a4413d4b5096/external/rules_python/python/pip.bzl:53:19: in pip_install
Repository rule pip_repository defined at:
  /data/.cache/envoy-compdb/_bazel_wangcong01/b938f25908549f924e43a4413d4b5096/external/rules_python/python/pip_install/pip_repository.bzl:67:33: in <toplevel>
ERROR: An error occurred during the fetch of repository 'pylint_pip3':
   Traceback (most recent call last):
	File "/data/.cache/envoy-compdb/_bazel_wangcong01/b938f25908549f924e43a4413d4b5096/external/rules_python/python/pip_install/pip_repository.bzl", line 63, column 13, in _pip_repository_impl
		fail("rules_python_external failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: rules_python_external failed: Collecting flake8==3.9.0
  Using cached https://files.pythonhosted.org/packages/2a/cb/cd92e789442e234b8701bf6e886a55fbc83b7fd6e529b047e20b9cf196e8/flake8-3.9.0-py2.py3-none-any.whl
.
.
.

Collecting typing-extensions>=3.6.4; python_version < "3.8"
 (ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    typing-extensions>=3.6.4; python_version < "3.8" from https://files.pythonhosted.org/packages/60/7a/e881b5abb54db0e6e671ab088d079c57ce54e8a01a3ca443f561ccadb37e/typing_extensions-3.7.4.3-py3-none-any.whl#sha256=7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918 (from importlib-metadata==3.9.0->-r /data/.cache/envoy-compdb/_bazel_wangcong01/b938f25908549f924e43a4413d4b5096/external/envoy/tools/code_format/requirements.txt (line 4))

Repro steps:

  • python version Python 3.6.9
  • pip version pip 21.0.1

I use below requirement.txt in my machine, and run /usr/bin/python3 -m pip wheel -r ./requirements.txt --require-hashes

importlib-metadata==3.9.0 \
    --hash=sha256:6fd684b4c6c7bb36d57e93d57fc244b5ffc08faa1c298bcda3dfbbbf19d7550a \
    --hash=sha256:036eae7ebbd41db176774c42e80f3288a1e41c7ebfc8ed099a94653973ebd00f

Note:
When I replace importlib-metadata version from 3.9.0 to 2.0.0 at

importlib-metadata==3.9.0 \
--hash=sha256:6fd684b4c6c7bb36d57e93d57fc244b5ffc08faa1c298bcda3dfbbbf19d7550a \
--hash=sha256:036eae7ebbd41db176774c42e80f3288a1e41c7ebfc8ed099a94653973ebd00f
mccabe==0.6.1 \
, everything works well.

importlib-metadata==2.0.0 \
    --hash=sha256:77a540690e24b0305878c37ffd421785a6f7e53c8b5720d211b211de8d0e95da \
    --hash=sha256:cefa1a2f919b866c5beb7c9f7b0ebb4061f30a8a9bf16d609b000e2dfaceb9c3

Related Link
python-poetry/poetry#3472
cjolowicz/hypermodern-python#174

@qinggniq qinggniq added bug triage Issue requires triage labels Mar 30, 2021
@qinggniq
Copy link
Contributor Author

cc @phlax, Does ci work well? I am not clear what causes it.

@phlax
Copy link
Member

phlax commented Mar 30, 2021

yep ci works well

i think the python version - altho not clear why 3.6.9 would pull typing-extensions - ill test later today with different versions of python

@qinggniq
Copy link
Contributor Author

It works on python 3.8.0

@mattklein123 mattklein123 added area/docs and removed bug triage Issue requires triage labels Mar 30, 2021
@phlax
Copy link
Member

phlax commented Mar 31, 2021

i think this is resolved and docs updated in #15764

@phlax phlax closed this as completed Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants