Pytorch and CUDA

hi,i’m using RTX 3050,Win 11 ,pip for install. I’m trying to install cuda 11.8 but it doesn’t seem to work
torch.cuda.is_available() always result False
here is my collect_env:
Collecting environment information…
PyTorch version: 2.0.0+cpu
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 11 Home Single Language
GCC version: Could not collect
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A

Python version: 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.22621-SP0
Is CUDA available: False
CUDA runtime version: 11.8.89
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3050 Laptop GPU
Nvidia driver version: 528.33
cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\cudnn_ops_train64_8.dll
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture=9
CurrentClockSpeed=2688
DeviceID=CPU0
Family=205
L2CacheSize=7680
L2CacheSpeed=
Manufacturer=GenuineIntel
MaxClockSpeed=2688
Name=11th Gen Intel(R) Core™ i5-11400H @ 2.70GHz
ProcessorType=3
Revision=

Versions of relevant libraries:
[pip3] numpy==1.24.1
[pip3] torch==2.0.0
[pip3] torchaudio==2.0.1+cu118
[pip3] torchvision==0.15.1+cu118
[conda] Could not collect

You’ve installed the CPU-only binary and would need to install a pip wheel or conda binary with a CUDA runtime as given in these install instructions.

i’ve install but it semm the same

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

python -m torch.utils.collect_env
Collecting environment information…
PyTorch version: 2.0.0+cpu

here is more information
Looking in indexes: https://download.pytorch.org/whl/cu118
Requirement already satisfied: torch in e:\xla\xla\lib\site-packages (2.0.0)
Requirement already satisfied: torchvision in e:\xla\xla\lib\site-packages (0.15.1+cu118)
Requirement already satisfied: torchaudio in e:\xla\xla\lib\site-packages (2.0.1+cu118)
Requirement already satisfied: filelock in e:\xla\xla\lib\site-packages (from torch) (3.10.0)
Requirement already satisfied: jinja2 in e:\xla\xla\lib\site-packages (from torch) (3.1.2)
Requirement already satisfied: sympy in e:\xla\xla\lib\site-packages (from torch) (1.11.1)
Requirement already satisfied: typing-extensions in e:\xla\xla\lib\site-packages (from torch) (4.5.0)
Requirement already satisfied: networkx in e:\xla\xla\lib\site-packages (from torch) (3.0)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in e:\xla\xla\lib\site-packages (from torchvision) (9.3.0)
Requirement already satisfied: numpy in e:\xla\xla\lib\site-packages (from torchvision) (1.24.1)
Requirement already satisfied: requests in e:\xla\xla\lib\site-packages (from torchvision) (2.28.1)
Requirement already satisfied: MarkupSafe>=2.0 in e:\xla\xla\lib\site-packages (from jinja2->torch) (2.1.2)
Requirement already satisfied: charset-normalizer<3,>=2 in e:\xla\xla\lib\site-packages (from requests->torchvision) (2.1.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in e:\xla\xla\lib\site-packages (from requests->torchvision) (1.26.13)
Requirement already satisfied: certifi>=2017.4.17 in e:\xla\xla\lib\site-packages (from requests->torchvision) (2022.12.7)
Requirement already satisfied: idna<4,>=2.5 in e:\xla\xla\lib\site-packages (from requests->torchvision) (3.4)
Requirement already satisfied: mpmath>=0.19 in e:\xla\xla\lib\site-packages (from sympy->torch) (1.3.0)
(XLA) PS E:\XLA> python -m torch.utils.collect_env
Collecting environment information…
PyTorch version: 2.0.0+cpu

@ptrblck pip list show
torch 2.0.0
torchaudio 2.0.1+cu118
torchvision 0.15.1+cu118

but when i tried torch.version the version is still 2.0.0+cpu

Uninstall this package, since rerunning the command is not re-installing any new libs as seen in your previous output:

Requirement already satisfied: torch in e:\xla\xla\lib\site-packages (2.0.0)
...

or alternatively create a new and empty virtual environment and install the right PyTorch wheels there.

so i need to create a new venv download torch and torch for cu118 again ?

@ptrblck
so i have create a new venv download the package
Successfully installed torchaudio-2.0.1+cu118 torchvision-0.15.1+cu118
and when i run torch.version the result is still
2.0.0+cpu