Hi , i did the same thing with you but it didn’t work.
My OS is Windows10.My cuda version 10.2
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:32:27_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.2, V10.2.89

Remove pytorch:
(base) C:\Users\pavlo>conda remove pytorch
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\pavlo\Miniconda3

  removed specs:
    - pytorch


The following packages will be REMOVED:

  blas-1.0-mkl
  freetype-2.9.1-ha9979f8_1
  icc_rt-2019.0.0-h0cc432a_1
  intel-openmp-2019.4-245
  jpeg-9b-hb83a4c4_2
  libpng-1.6.37-h2a8f88b_0
  libtiff-4.1.0-h56a325e_0
  mkl-2019.4-245
  mkl-service-2.3.0-py37hb782905_0
  mkl_fft-1.0.15-py37h14836fe_0
  mkl_random-1.1.0-py37h675688f_0
  ninja-1.9.0-py37h74a9793_0
  numpy-1.18.1-py37h93ca92e_0
  numpy-base-1.18.1-py37hc3f5095_1
  olefile-0.46-py37_0
  pillow-7.0.0-py37hcc1f983_0
  pytorch-1.4.0-py3.7_cpu_0
  tk-8.6.8-hfa6e2cd_0
  torchvision-0.5.0-py37_cpu
  xz-5.2.4-h2fa13f4_4
  zlib-1.2.11-h62dcd97_3
  zstd-1.3.7-h508b16e_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

Install pytorch again:
(base) C:\Users\pavlo>conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\pavlo\Miniconda3

  added / updated specs:
    - cudatoolkit=10.1
    - pytorch
    - torchvision


The following NEW packages will be INSTALLED:

  blas               pkgs/main/win-64::blas-1.0-mkl
  freetype           pkgs/main/win-64::freetype-2.9.1-ha9979f8_1
  icc_rt             pkgs/main/win-64::icc_rt-2019.0.0-h0cc432a_1
  intel-openmp       pkgs/main/win-64::intel-openmp-2019.4-245
  jpeg               pkgs/main/win-64::jpeg-9b-hb83a4c4_2
  libpng             pkgs/main/win-64::libpng-1.6.37-h2a8f88b_0
  libtiff            pkgs/main/win-64::libtiff-4.1.0-h56a325e_0
  mkl                pkgs/main/win-64::mkl-2019.4-245
  mkl-service        pkgs/main/win-64::mkl-service-2.3.0-py37hb782905_0
  mkl_fft            pkgs/main/win-64::mkl_fft-1.0.15-py37h14836fe_0
  mkl_random         pkgs/main/win-64::mkl_random-1.1.0-py37h675688f_0
  ninja              pkgs/main/win-64::ninja-1.9.0-py37h74a9793_0
  numpy              pkgs/main/win-64::numpy-1.18.1-py37h93ca92e_0
  numpy-base         pkgs/main/win-64::numpy-base-1.18.1-py37hc3f5095_1
  olefile            pkgs/main/win-64::olefile-0.46-py37_0
  pillow             pkgs/main/win-64::pillow-7.0.0-py37hcc1f983_0
  pytorch            pytorch/win-64::pytorch-1.4.0-py3.7_cpu_0
  tk                 pkgs/main/win-64::tk-8.6.8-hfa6e2cd_0
  torchvision        pytorch/win-64::torchvision-0.5.0-py37_cpu
  xz                 pkgs/main/win-64::xz-5.2.4-h2fa13f4_4
  zlib               pkgs/main/win-64::zlib-1.2.11-h62dcd97_3
  zstd               pkgs/main/win-64::zstd-1.3.7-h508b16e_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(base) C:\Users\pavlo>python -c "import torch;print(torch.cuda.is_available())"
False

Do you have any ideas of what is going on here? Here is my conda list and i wonder why i have a [cpuonly] on pytorch package.
(base) C:\Users\pavlo>conda list
# packages in environment at C:\Users\pavlo\Miniconda3:
#
# Name                    Version                   Build  Channel
absl-py                   0.8.1                    pypi_0    pypi
asn1crypto                1.3.0                    py37_0
astor                     0.8.0                    pypi_0    pypi
atari-py                  0.2.6                    pypi_0    pypi
blas                      1.0                         mkl
ca-certificates           2020.1.1                      0
certifi                   2019.11.28               py37_0
cffi                      1.13.2           py37h7a1dbc1_0
chardet                   3.0.4                 py37_1003
cloudpickle               1.2.2                    pypi_0    pypi
conda                     4.8.1                    py37_0
conda-package-handling    1.6.0            py37h62dcd97_0
console_shortcut          0.1.1                         3
cpuonly                   1.0                           0    pytorch
cryptography              2.8              py37h7a1dbc1_0
cudatoolkit               10.1.243             h74a9793_0
cycler                    0.10.0                   pypi_0    pypi
cython                    0.29.13                  pypi_0    pypi
freetype                  2.9.1                ha9979f8_1
future                    0.18.0                   pypi_0    pypi
gast                      0.2.2                    pypi_0    pypi
google-pasta              0.1.7                    pypi_0    pypi
grpcio                    1.24.1                   pypi_0    pypi
gym                       0.15.3                   pypi_0    pypi
h5py                      2.10.0                   pypi_0    pypi
icc_rt                    2019.0.0             h0cc432a_1
idna                      2.8                      py37_0
intel-openmp              2019.4                      245
jpeg                      9b                   hb83a4c4_2
keras                     2.3.1                    pypi_0    pypi
keras-applications        1.0.8                    pypi_0    pypi
keras-preprocessing       1.1.0                    pypi_0    pypi
keras-rl                  0.4.2                    pypi_0    pypi
kiwisolver                1.1.0                    pypi_0    pypi
libpng                    1.6.37               h2a8f88b_0
libtiff                   4.1.0                h56a325e_0
lxml                      4.4.1                    pypi_0    pypi
markdown                  3.1.1                    pypi_0    pypi
matplotlib                3.1.1                    pypi_0    pypi
menuinst                  1.4.16           py37he774522_0
mkl                       2019.4                      245
mkl-service               2.3.0            py37hb782905_0
mkl_fft                   1.0.15           py37h14836fe_0
mkl_random                1.1.0            py37h675688f_0
ninja                     1.9.0            py37h74a9793_0
numpy                     1.17.2                   pypi_0    pypi
numpy-base                1.18.1           py37hc3f5095_1
olefile                   0.46                     py37_0
opencv-python             4.1.1.26                 pypi_0    pypi
openssl                   1.1.1d               he774522_3
opt-einsum                3.1.0                    pypi_0    pypi
pillow                    7.0.0            py37hcc1f983_0
pip                       20.0.2                   py37_1
powershell_shortcut       0.0.1                         2
protobuf                  3.10.0                   pypi_0    pypi
psutil                    5.6.3                    pypi_0    pypi
pycosat                   0.6.3            py37he774522_0
pycparser                 2.19                     py37_0
pyglet                    1.3.2                    pypi_0    pypi
pyopenssl                 19.1.0                   py37_0
pyparsing                 2.4.3                    pypi_0    pypi
pyprind                   2.11.2                   pypi_0    pypi
pysocks                   1.7.1                    py37_0
python                    3.7.3                h8c8aaf0_1
python-dateutil           2.8.1                    pypi_0    pypi
pytils                    0.3                      pypi_0    pypi
pytorch                   1.4.0               py3.7_cpu_0  [cpuonly]  pytorch
pywin32                   227              py37he774522_1
pyyaml                    5.1.2                    pypi_0    pypi
requests                  2.22.0                   py37_1
rlpyt                     0.1.1.dev0                dev_0    <develop>
ruamel_yaml               0.15.87          py37he774522_0
scipy                     1.3.1                    pypi_0    pypi
setuptools                45.1.0                   py37_0
six                       1.14.0                   py37_0
sqlite                    3.30.1               he774522_0
tb-nightly                1.14.0a20190603          pypi_0    pypi
tensorboard               2.0.0                    pypi_0    pypi
tensorflow                2.0.0b0                  pypi_0    pypi
tensorflow-estimator      2.0.0                    pypi_0    pypi
termcolor                 1.1.0                    pypi_0    pypi
tf-estimator-nightly      1.14.0.dev2019060501          pypi_0    pypi
tk                        8.6.8                hfa6e2cd_0
tools                     0.1.9                    pypi_0    pypi
torchvision               0.5.0                  py37_cpu  [cpuonly]  pytorch
tqdm                      4.42.0                     py_0
urllib3                   1.25.8                   py37_0
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.16.27012          hf0eaf9b_1
werkzeug                  0.16.0                   pypi_0    pypi
wheel                     0.34.1                   py37_0
win_inet_pton             1.1.0                    py37_0
wincertstore              0.2                      py37_0
wrapt                     1.11.2                   pypi_0    pypi
xz                        5.2.4                h2fa13f4_4
yaml                      0.1.7                hc54c509_2
zlib                      1.2.11               h62dcd97_3
zstd                      1.3.7                h508b16e_0