This is a followup to this question
Installing a pip package with cupy as a requirement puts install in never ending loop
Where somehow a pip package was not able to detect that cupy is already installed, and tried to re-install it.
The solution given was to use
try:
import cupy
except Exception:
install_requires.append('cupy')
Which worked for when I tried to install through github with
!pip install https://github.com/Santosh-Gupta/SpeedTorch/archive/master.zip
However, when I uploaded by code to pip and tried to run it, it's re-installing cupy again
!pip install SpeedTorch
I am using Goolgle colab, which already has cupy installed. For convenience, here's a link to the notebook I am using
https://colab.research.google.com/drive/17KrdcHh29cpFMel_oYnOTkA1dNElolZ1
And here is my setup.py file
https://github.com/Santosh-Gupta/SpeedTorch/blob/master/setup.py
This problem may be unique to cupy, since I do not have this issue with other python packages.