How to correctly list PyTorch as pip package dependency?

In my setup.py, I have both torch and torchvision specified for install_requires:

install_requires=['torch', 'torchvision'],

I setup a test package on test.pypi.org, and when I try to download my project I get this error:

ERROR: Could not find a version that satisfies the requirement torch (from project-name) (from versions: none)
ERROR: No matching distribution found for torch (from project-name)

If I install torch ahead of time using sudo pip3 install torch or sudo pip install torch, I don’t get the error message and torchvision is installed automatically.