Installing specific version of mmcv with find-links fails with new pip-20.3
See original GitHub issueI’m not sure what’s happening.
With pip 20.1.1 I was able to run:
pip install mmcv_full==1.0.5+torch1.6.0+cpu -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
and it works fine.
After upgrading pip to 20.3 I run the same command and get:
Looking in links: https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
ERROR: Exception:
Traceback (most recent call last):
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 171, in _merge_into_criterion
crit = self.state.criteria[name]
KeyError: 'mmcv-full'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 210, in _main
status = self.run(options, args)
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
return func(self, options, args)
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 319, in run
reqs, check_supported_wheels=not options.target_dir
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 122, in resolve
requirements, max_rounds=try_to_avoid_resolution_too_deep,
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 445, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 310, in resolve
name, crit = self._merge_into_criterion(r, parent=None)
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _merge_into_criterion
crit = Criterion.from_requirement(self._p, requirement, parent)
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 82, in from_requirement
if not cands:
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_vendor/resolvelib/structs.py", line 124, in __bool__
return bool(self._sequence)
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 96, in __bool__
return any(self)
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 20, in _deduplicated_by_version
for candidate in candidates:
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 203, in iter_index_candidates
version=ican.version,
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 145, in _make_candidate_from_link
link, template, factory=self, name=name, version=version,
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 290, in __init__
wheel_version = Version(wheel.version)
File "/home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages/pip/_vendor/packaging/version.py", line 298, in __init__
raise InvalidVersion("Invalid version: '{0}'".format(version))
pip._vendor.packaging.version.InvalidVersion: Invalid version: '1.0.5+torch1.6.0+cpu'
OS is Ubuntu 20.04.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Installation — mmcv 1.7.0 documentation - Read the Docs
If version information is output, then PyTorch is installed. Install with mim (recommended). mim is the package management tool for the OpenMMLab projects, ......
Read more >errors when installing mmcv - Stack Overflow
Running setup.py install for mmcv-full ... error ERROR: Command errored out with exit status 1: command: /root/miniconda3/bin/python -u -c ...
Read more >mmcv Changelog - pyup.io
3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 [here](https://github.com/open-mmlab/mmcv/blob/master/docs/get_started/previous_versions.md ...
Read more >mmcv-full - Python Package Health Analysis - Snyk
Learn more about mmcv-full: package health score, popularity, security, maintenance ... cadence with at least one new version released in the past 3...
Read more >master · KEU-ComputerVision / ML / mmdetection3d - GitLab
Please install the correct version of MMCV and MMDetection to avoid ... versions of MMCV compatible to different PyTorch and CUDA versions.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Running a version with +cpu also fails:
However, removing both torch and cpu specification works:
That works, but it takes a very long time and maxes out several of my cpu cores. (Its probably solving some dependency resolution problem). I’m thinking the new 2020 resolver broke something.
Yup: turning on the old resolver fixed it:
Not sure if the error with the new resolver is in pip or if mmcv versions need to be changed to accommodate it.
As a workaround suggested by @Erotemic, you can use
pip install mmcv-full==latest+torch1.7.0+cu102 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html --use-deprecated=legacy-resolver
.