PyTorch with python2

Hi Can I still use PyTorch with python 2? I have used it before around 6 months ago but now it seems that PyTorch does not support python2 . Is there any work around?

Yes, about a year ago, PyTorch dropped Python2 support as in PyTorch 1.5 released, new and updated APIs including C++ frontend API parity with Python | PyTorch.

So, PyTorc<1.5 is an alternative.

1 Like

While @crcrpar is correct that older PyTorch releases might work, I would not recommend to use Python2 anymore, as it’s not maintained anymore, so let it rest in peace :wink:

1 Like

Hi @crcrpar @ptrblck Thank you for the suggestion I tried older version and it is working. I am using ROS(Robot Operating System) so I have to use python2 I tried to use python3 with ros but there it is a bit confusing to use so I have to use python2