How to build from source code without trailing torch-1.8.0a0+gitf2a38a0 version

Dear Forum,
I am finished compile from source with the following command:

python setup.py install

or

python setup.py bdist_wheel

but the version is torch-1.8.0a0+gitf2a38a0 not torch-1.8.0 only.

This made the torchvision can’t be installed since pip only can detect the number only.

Here are the pics

Might @glaringlee can help? Thanks

You can hard-code the version in setup.py as a workaround. In my setup.py, it’s on line 295:

version = get_torch_version()

Change this to:

version = "1.8.0"

and re-run the installation command.

The desired torchvision wheel requires the PyTorch 1.8.0 release, while you are using a commit from the master branch before 1.8.0 was cut.
You could either also use an older torchvision commit and build it from source or alternatively you could git checkout v1.8.0 and build the PyTorch release version from source.

@jbschlosser @ptrblck great answers.
both working as desired, thanks all!