Hello everyone.
I just configured my GPU and I was trying to use Pytorch with CUDA.
I am facing quite a simple error I think.
I run:

import torch
a = torch.randn(10).cuda()

and i get:
Traceback (most recent call last):

File “<stdin>”, line 1, in <module>
File “/home/pablo/.local/lib/python2.7/site-packages/torch/_utils.py”, line 69, in cuda return new_type(self.size()).copy(self, async)
File “/home/pablo/.local/lib/python2.7/site-packages/torch/cuda/init.py”, line 358, in _lazy_new_lazy_init()
File “/home/pablo/.local/lib/python2.7/site-packages/torch/cuda/init.py”, line 120, in _lazy_init_check_driver()
File “/home/pablo/.local/lib/python2.7/site-packages/torch/cuda/init.py”, line 55, in _check_driver raise AssertionError(“Torch not compiled with CUDA enabled”)
AssertionError: Torch not compiled with CUDA enabled

I guess the solution is as simple as: Install Pytorch with CUDA. Hence I tried running:

pip install http://download.pytorch.org/whl/cu80/torch-0.3.0.post4-cp27-cp27mu-linux_x86_64.whl 28

which is Pytorch for Linux, with CUDA 8.0 and i get:

Requirement already satisfied: torch==0.3.0.post4 from http://download.pytorch.org/whl/cu80/torch-0.3.0.post4-cp27-cp27mu-linux_x86_64.whl 28 in ./.local/lib/python2.7/site-packages
Requirement already satisfied: pyyaml in ./.local/lib/python2.7/site-packages (from torch==0.3.0.post4)
Requirement already satisfied: numpy in ./.local/lib/python2.7/site-packages (from torch==0.3.0.post4)

But running the what I wrote at the begining I have the same problem. Can anyone tell me what is happening?
Thank you very much in advance.