"Found no NVIDIA driver on your system" pytorch error

On ubuntu 17.10 system, I installed anaconda3 then I installed pytorch using

conda install pytorch torchvision cuda80 -c soumith

When I run torch.cuda.is_available() I get False and when I do something like x.cuda(), I get

AssertionError:
Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx

I checked the Cuda version using nvcc --version and it resulted in:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:2    2:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

And I got the Nvidia driver verison by nvidia-smi, which returned

Tue Jan 2 05:28:31 2018
±----------------------------------------------------------------------------+
| NVIDIA-SMI 384.98 Driver Version: 384.98 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce 920M Off | 00000000:03:00.0 N/A | N/A |
| N/A 35C P0 N/A / N/A | 694MiB / 2004MiB | N/A Default |
±------------------------------±---------------------±---------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0                    Not Supported                                       |
+-----------------------------------------------------------------------------+

So I am not sure why pytorch cannot find the Nvidia driver.

Your driver doesn’t detect any GPU. Check that you have an Nvidia GPU and the driver is installed properly.