Installing PyTorch with CUDA for Python 2.7 on windows 10

I have now been stuck on this problem for 2 days and it seems to be a almost un-googlable problem. I know that pytorch does not support 2.7 since version 1.4 and I know that 2.7 has been deprecated, but I am trying to replicate the code from this repository: GitHub - XiSHEN0220/ArtMiner: (CVPR 2019) Pytorch implementation of paper "Discovering Visual Patterns in Art Collections with Spatially-consistent Feature Learning" which just so happen to use very outdated tools.

I am on a windows 10 PC with cuda 11.1 installed and I’ve tried countless “pip install” calls but I just cannot seem to find a torch version with cuda that support 2.7 on windows. This also made me attempt approaches with Docker and an Ubuntu VM in Virtualbox, but so far to no avail.

Has anyone been in the same situation and know how to solve it?

I need a torch version with cuda that can be installed on python 2.7 for windows 10 and works with the cuda 11.1 toolkit.

Thank you all in advance!

As you’ve already mentioned, the current PyTorch binaries are not built anymore for Python2.7.
I would guess the right approach would be to update the repository to use Python>=3.6.
Alternatively, you could try to build PyTorch from source using Python2.7 (with potentially some needed fixes) at your own risk.

Thank you for the answer, @ptrblck, but I gave up on trying to find a solution. I imagine building from source might work, but in my case it wasn’t worth it.