Compiling TorchVision
- Obtain the TorchVision source code.
1git clone https://github.com/pytorch/vision.git -b v0.19.0 --depth 1
- Go to the vision directory, and compile and install TorchVision.
1 2
cd vision python3 setup.py bdist_wheel
After the installation is complete, the torchvision*.whl file is generated in the dist directory.
- Verify the installation.
1 2
pip3 install dist/torchvision*.whl python3
Run the following commands:
1 2
import torchvision print(torchvision.__version__)
If the version information is displayed, the installation is successful.
