I ran into some issues when trying to set this up on my machine so I made some changes to the setup.py in order to make this more accessible to new users. The changes include:
Always delete the libtorch folder and extract libtorch.zip. I had the problem that the setup.py failed silently after cleaning the git repository since there was an empty libtorch folder. This lead to libtorch.zip not being extracted. This is fixed by deleting the folder each time setup.py runs. Also this makes sure there are no old files left in case the value of url was changed. I think the few seconds needed to extract the file is nothing compared to how long this script runs.
On some operating systems python is not available but is called python3 so I added a check for that.
Install the python module as user because it would fail without sudo.
Added libtorch to gitignore because this was showing up as 1000+ untracked files.
I ran into some issues when trying to set this up on my machine so I made some changes to the setup.py in order to make this more accessible to new users. The changes include: