Repository: Lightning-AI/torchmetrics

Issue:
pip install failure for Python 3.10
## 🐛 Bug

pip fails to install required dependencies

### To Reproduce

Steps to reproduce the behavior:

```shell
 % python --version
Python 3.10.2
 % pip freeze
 % pip install torchmetrics
Collecting torchmetrics
  Using cached torchmetrics-0.7.0-py3-none-any.whl (396 kB)
  Using cached torchmetrics-0.6.2-py3-none-any.whl (332 kB)
  Using cached torchmetrics-0.6.1-py3-none-any.whl (332 kB)
  Using cached torchmetrics-0.6.0-py3-none-any.whl (329 kB)
  Using cached torchmetrics-0.5.1-py3-none-any.whl (282 kB)
  Using cached torchmetrics-0.5.0-py3-none-any.whl (272 kB)
  Using cached torchmetrics-0.4.1-py3-none-any.whl (234 kB)
  Using cached torchmetrics-0.3.2-py3-none-any.whl (274 kB)
  Using cached torchmetrics-0.3.1-py3-none-any.whl (271 kB)
  Using cached torchmetrics-0.3.0-py3-none-any.whl (270 kB)
  Using cached torchmetrics-0.2.0-py3-none-any.whl (176 kB)
ERROR: Cannot install torchmetrics==0.2.0, torchmetrics==0.3.0, torchmetrics==0.3.1, torchmetrics==0.3.2, torchmetrics==0.4.1, torchmetrics==0.5.0, torchmetrics==0.5.1, torchmetrics==0.6.0, torchmetrics==0.6.1, torchmetrics==0.6.2 and torchmetrics==0.7.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    torchmetrics 0.7.0 depends on torch>=1.3.1
    torchmetrics 0.6.2 depends on torch>=1.3.1
    torchmetrics 0.6.1 depends on torch>=1.3.1
    torchmetrics 0.6.0 depends on torch>=1.3.1
    torchmetrics 0.5.1 depends on torch>=1.3.1
    torchmetrics 0.5.0 depends on torch>=1.3.1
    torchmetrics 0.4.1 depends on torch>=1.3.1
    torchmetrics 0.3.2 depends on torch>=1.3.1
    torchmetrics 0.3.1 depends on torch>=1.3.1
    torchmetrics 0.3.0 depends on torch>=1.3.1
    torchmetrics 0.2.0 depends on torch>=1.3.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
```

### Expected behavior

`pip` instals all dependencies itself and then installs `torchmetrics`.

### Environment

- PyTorch Version (e.g., 1.0): No
- OS (e.g., Linux): Ubuntu 21.10
- How you installed PyTorch (`conda`, `pip`, source): pip
- Build command you used (if compiling from source): pip install torchmetrics
- Python version: 3.10.2



Discussion:
I think the problem comes from PyTorch dependency as they have not officially released wheels for python 3.10 so for this python version you would need to compile PyTorch from the source... the binaries for python 3.10 are expected for PT 1.11

see: https://github.com/pytorch/pytorch/issues/66424
So, `torchmetrics` doesn't support Python 3.10 officially, although there is a badge claiming that on the front page. PyTorchLightning doesn't claim 3.10 support, for example, and `torch` documentation recommends using 3.6, 3.7, or 3.8.

I suggest either dropping the Python 3.10 support claim or adding specific 3.10 installation instructions to the documentation as a form of weak support.
@inpefess you are correct. For now, we certainly need to remove the badge.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -101,6 +101,5 @@ def _prepare_extras(skip_files: Tuple[str] = ("devel.txt")):
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
-        "Programming Language :: Python :: 3.10",
     ],
 )


Test patch: