For me I added this line to the top of requirements.txt` file. I was able to install the packages successfully.
requirements.txt`
torch==2.2.2