pipenv: Unable to install mmcv-full with pipenv.

Issue description

Unable to install mmcv-full with pipenv.

Expected result

Can be installed without problems

Actual result

An error will occur as shown below.

⋊> /m/n/k/c/work on dev-mmdet-2.23.0 ⨯ pipenv lock     12:10:07
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success!
Updated Pipfile.lock (a7d644)!
⋊> /m/n/k/c/work on dev-mmdet-2.23.0 ⨯ pipenv sync     12:10:51
Installing dependencies from Pipfile.lock (a7d644)...
An error occurred while installing https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.0/mmcv_full-1.4.7-cp38-cp38-manylinux1_x86_64.whl#egg=mmcv-full --hash=sha256:7459572935a7ba6293fee619c205583d76cd832464ffe9f15115ebe0396450e4! Will try again.
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 14/14 — 00:00:20
Installing initially failed dependencies...
[pipenv.exceptions.InstallError]: Collecting mmcv-full==1.4.7
[pipenv.exceptions.InstallError]:   Using cached https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.0/mmcv_full-1.4.7-cp38-cp38-manylinux1_x86_64.whl (47.7 MB)
[pipenv.exceptions.InstallError]: ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
[pipenv.exceptions.InstallError]:     mmcv-full==1.4.7 from https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.0/mmcv_full-1.4.7-cp38-cp38-manylinux1_x86_64.whl#egg=mmcv-full (from -r /tmp/pipenv-vznfd55f-requirements/pipenv-1z06yhcm-requirement.txt (line 1)):
[pipenv.exceptions.InstallError]:         Expected sha256 7459572935a7ba6293fee619c205583d76cd832464ffe9f15115ebe0396450e4
[pipenv.exceptions.InstallError]:              Got        95dde9139fec10789406aa13e4824c3187805f52f23acd5aa6b924094be5e427
ERROR: Couldn't install package: mmcv-full
 Package installation failed...
  ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/1 — 00:00:02
⋊> /m/n/k/c/work on dev-mmdet-2.23.0 ⨯ 

Steps to replicate

For commands only, it can be reproduced as follows.

pip install pipenv
pipenv --python 3.8.6
pipenv install "mmcv-full==1.4.7" -i https://download.openmmlab.com/mmcv/dist/cu113/t
orch1.10.0/index.html

Another method is to write it in the Pipfile in advance and then lock and sync.

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
mmcv-full = {file = "https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.0/mmcv_full-1.4.7-cp38-cp38-manylinux1_x86_64.whl"}
torch = {file = "https://download.pytorch.org/whl/cu113/torch-1.10.0%2Bcu113-cp38-cp38-linux_x86_64.whl"}
torchvision = {file = "https://download.pytorch.org/whl/cu113/torchvision-0.11.0%2Bcu113-cp38-cp38-linux_x86_64.whl"}
mmdet = "==2.23.0"

[dev-packages]

[requires]
python_version = "3.8"

After creating the above Pipfile, do pipenv lock and pipenv sync.

pipenv lock
pipenv sync

Environment

It is running in the following environment.

⋊> ~ nvidia-container-cli info                                               12:05:06
NVRM version:   465.19.01
CUDA version:   11.3

Device Index:   0
Device Minor:   0
Model:          NVIDIA Tesla T4
Brand:          Nvidia
GPU UUID:       GPU-b2fd7cfe-e194-bdb7-3a2a-78a5d8528d38
Bus Location:   00000000:00:1e.0
Architecture:   7.5
⋊> ~ lsb_release -a                                                          12:05:32
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:        18.04
Codename:       bionic
⋊> ~  

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

Thanks @Keiku – there should be a new release in an hour or so that will included the latest changes and the fix for the original issue. The torchvision version error difference remains a mystery, but I will keep it in mind if we get any other issue reports with the same error like that. May end up closing at some point soon based on your positive feedback. Thanks!

@matteius In pipenv version 2022.4.9.dev0, the below error occur with lock. I’m not sure why this is happening.

⋊> /m/n/k/c/work on dev-mmdet-2.23.0 ⨯ pipenv --version
pipenv, version 2022.4.9.dev0
⋊> /m/n/k/c/work on dev-mmdet-2.23.0 ⨯ pipenv lock     15:41:16
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed!

Traceback (most recent call last):
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 857, in <module>
    main()
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 843, in main
    _main(
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 822, in _main
    resolve_packages(
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 771, in resolve_packages
    results, resolver = resolve(
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 751, in resolve
    return resolve_deps(
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/utils/resolver.py", line 1066, in resolve_deps
    results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/utils/resolver.py", line 862, in actually_resolve_deps
    resolver.resolve()
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/utils/resolver.py", line 661, in resolve
    results = resolver.resolve(self.constraints, check_supported_wheels=False)
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/patched/notpip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
    result = self._result = resolver.resolve(
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/resolvelib/resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/resolvelib/resolvers.py", line 373, in resolve
    failure_causes = self._attempt_to_pin_criterion(name)
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/resolvelib/resolvers.py", line 213, in _attempt_to_pin_criterion
    criteria = self._get_updated_criteria(candidate)
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/resolvelib/resolvers.py", line 204, in _get_updated_criteria
    self._add_to_criteria(criteria, requirement, parent=candidate)
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/resolvelib/resolvers.py", line 168, in _add_to_criteria
    candidates=build_iter_view(matches),
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/resolvelib/structs.py", line 164, in build_iter_view
    matches = list(matches)
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/patched/notpip/_internal/resolution/resolvelib/factory.py", line 452, in <genexpr>
    and all(req.is_satisfied_by(c) for req in requirements[identifier])
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/patched/notpip/_internal/resolution/resolvelib/factory.py", line 452, in <genexpr>
    and all(req.is_satisfied_by(c) for req in requirements[identifier])
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/patched/notpip/_internal/resolution/resolvelib/requirements.py", line 93, in is_satisfied_by
    return spec.contains(candidate.version, prereleases=True)
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/vendor/packaging/specifiers.py", line 728, in contains
    item = parse(item)
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/vendor/packaging/version.py", line 49, in parse
    return Version(version)
  File "/home/anasys/.local/lib/python3.9/site-packages/pipenv/vendor/packaging/version.py", line 264, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object

⋊> /m/n/k/c/work on dev-mmdet-2.23.0 ⨯ 

I’ll try the main branch for now.