conda create -n condaenv-torch python=3.11 ipykernel
conda activate condaenv-torch
Go to the following web-page:
https://pytorch.org/get-started/locally/
Select the good configuration of your platform.
if Linux or Windows and you want GPU support (offered through NVIDIA)
https://developer.nvidia.com/cuda-downloads
--> select Cuda version, but also install cuda support on your machine.
using with GPU support, but be sure to install CUDA support first! from https://pytorch.org/get-started/locally/:
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
Type the following in, in a command shell or in a terminal of an IDE:
import torch
x = torch.rand(5, 3)
print(x)
torch.cuda.is_available()