I've encountered an issue installing the first requirement for PyTorch Geometric in PyTorch Scatter. I'm attempting to install PyTorch Geometric as part of a Singularity container created from a Docker image with CUDA==11.0 and cuDNN=8. The error I receive says that I pass an Invalid version: latest+cu110 when trying to install PyTorch Scatter.
The first error I receive is displayed below:
+ pip install torch-scatter==latest+cu110 -f https://pytorch-geometric.com/whl/torch-1.7.0.html
Looking in links: https://pytorch-geometric.com/whl/torch-1.7.0.html
ERROR: Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 171, in _merge_into_criterion
crit = self.state.criteria[name]
KeyError: 'torch-scatter'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/base_command.py", line 210, in _main
status = self.run(options, args)
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
return func(self, options, args)
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/commands/install.py", line 319, in run
reqs, check_supported_wheels=not options.target_dir
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/resolution/resolvelib/resolver.py", line 122, in resolve
requirements, max_rounds=try_to_avoid_resolution_too_deep,
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 445, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 310, in resolve
name, crit = self._merge_into_criterion(r, parent=None)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _merge_into_criterion
crit = Criterion.from_requirement(self._p, requirement, parent)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 82, in from_requirement
if not cands:
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/resolvelib/structs.py", line 124, in __bool__
return bool(self._sequence)
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 96, in __bool__
return any(self)
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 20, in _deduplicated_by_version
for candidate in candidates:
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 203, in iter_index_candidates
version=ican.version,
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 145, in _make_candidate_from_link
link, template, factory=self, name=name, version=version,
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 290, in __init__
wheel_version = Version(wheel.version)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/packaging/version.py", line 298, in __init__
raise InvalidVersion("Invalid version: '{0}'".format(version))
pip._vendor.packaging.version.InvalidVersion: Invalid version: 'latest+cu110'
FATAL: failed to execute %post proc: exit status 2
Just in case the latest flag was deprecated, I changed the previous installation command
pip install torch-scatter==latest+cu110 -f https://pytorch-geometric.com/whl/torch-1.7.0.html
to
pip install torch-scatter==2.5.0+cu110 -f https://pytorch-geometric.com/whl/torch-1.7.0.html
With the above installation command with an explicit PyTorch Scatter version I now get the following error:
ERROR: Requested torch-scatter==2.0.5+cu110 from https://pytorch-geometric.com/whl/torch-1.7.0/torch_scatter-2.0.5%2Bcu110-cp36-cp36m-linux_x86_64.whl has different version in metadata: '2.0.5'
FATAL: failed to execute %post proc: exit status 1
FATAL: While performing build: while running engine: while running /usr/local/libexec/singularity/bin/starter: exit status 255
Now I receive an error saying that there is a different version in metadata: '2.0.5'.
I have built this same Singularity container with the same PyTorch Geometric installation commands just last week, but now I am receiving installation errors. What should I do / how should I change the way I am trying to install PyTorch Geometric to avoid these errors? Thanks in advance for any help you can provide.
nvcc.N/A
Seems related to https://github.com/rusty1s/pytorch_scatter/issues/179.
@wecarsoniv you can manually downgrade pip to 19.3 to get it to keep working until the .whls are rebuilt
@lilleswing thank you this solution worked
This is now resolved. You can now install the packages via:
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
For example, for installing for PyTorch 1.7.0 with CUDA 11.0, type:
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://pytorch-geometric.com/whl/torch-torch-1.7.0+cu110.html
All "old" links are still intact. You can have a look at all possible combinations here.
Most helpful comment
This is now resolved. You can now install the packages via:
For example, for installing for PyTorch 1.7.0 with CUDA 11.0, type:
All "old" links are still intact. You can have a look at all possible combinations here.