Pytorch Import Error when deploying django on AWS
My django app works locally. When i try to deploy it and then open it on AWS, i get the following error:

I included torch==1.5.1 in my requirements.txt
Requirements.txt:

When I comment out the parts of the application that require torch and remove it from requirements.txt, it works fine. What can I do to ensure that torch is installed like the other modules in requirements.txt? Here is the link to requirements.txt

By default torch will require CUDA and GPU. Depending on your ec2 instance this may not be viable option, thus leading to the errors you are observing.
You can install non-cuda version of torch as follows for tests and see if this will have any benefits:
pip3 install torch==1.5.1+cpu torchvision==0.6.1+cpu -f https://download.pytorch.org/whl/torch_stable.html

