Issue Installing PyTorch

It seems I am not able to download any version of PyTorch. When installing either with the PyCharm package manager or through pip terminal commands, I get the following error:
warning: missing-index-doctype

× The package index page being used does not have a proper HTML doctype declaration.
╰─> Problematic URL: https://download.pytorch.org/whl/cu113/torch_stable.html

note: This is an issue with the page at the URL mentioned above.
hint: You might need to reach out to the owner of that package index, to get this fixed. See [DEPRECATION] Moving away from html5lib to html.parser · Issue #10825 · pypa/pip · GitHub for context.
ERROR: Could not find a version that satisfies the requirement torch==1.10.2+cu113 (from versions: none)
ERROR: No matching distribution found for torch==1.10.2+cu113

A similar error occurs no matter which version or cuda version command I enter. I am using Python 3.8.2 on Windows 10. Does anyone have a work around for this?

Thanks in advance,
Neil

I think this is a similar problem to this one:

How to solve the problem is described here:
pypa/pip#10825

Unfortunately the solutions there (notably passing --use-deprecated=html5lib) does not work for PyTorch, as mentioned by others on the thread who have tried. Any other workaround?

Right. Looks like pip became more strict about standards and this affected pytorch.
I would try to downgrade pip installer.

Some people in this thread recommended:

pip3 install --no-cache --upgrade pip==21.3.1 -i https://pypi.org/simple/

to get 21.x

or

python -m pip uninstall pip && python -m ensurepip
to get a version of pip that was bundled with your Python version.

Good idea to do this kind of stuff in virtual environments, if possible

Tried this as well. This eliminates the original “missing-index-doctype” warning, yet the error remains:
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch

I’ve tried a few pip versions, and as long as its <22.0 the html error goes away. I will try going through conda.