Cant Install CUDA for gpu

Hi newbie here,
please help me im not able to install CUDA for julia

(v1.0) pkg> add CUDA
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: The following package names could not be resolved:
 * CUDA (not found in project, manifest or registry)
Please specify by known `name=uuid`.

(v1.0) pkg> add CUDAnative
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package CUDAnative [be33ccc6]:
 CUDAnative [be33ccc6] log:
 ├─possible versions are: [0.7.0, 0.8.0-0.8.10, 0.9.0-0.9.1, 0.10.0-0.10.1, 1.0.0-1.0.1, 2.0.0-2.0.1, 2.1.0-2.1.3, 2.2.0-2.2.1, 2.3.0-2.3.1, 2.4.0, 2.5.0-2.5.5, 2.6.0, 2.7.0, 2.8.0-2.8.1, 2.9.0-2.9.1, 2.10.0-2.10.2] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.7.0, 0.8.0-0.8.10, 0.9.0-0.9.1, 0.10.0-0.10.1, 1.0.0-1.0.1, 2.0.0-2.0.1, 2.1.0-2.1.3, 2.2.0-2.2.1, 2.3.0-2.3.1, 2.4.0, 2.5.0-2.5.5, 2.6.0, 2.7.0, 2.8.0-2.8.1, 2.9.0-2.9.1, 2.10.0-2.10.2]
 ├─restricted by julia compatibility requirements to versions: [0.7.0, 0.8.0-0.8.10, 0.9.0-0.9.1, 0.10.0-0.10.1, 1.0.0-1.0.1, 2.0.0-2.0.1, 2.1.0-2.1.3, 2.2.0-2.2.1, 2.3.0-2.3.1, 2.4.0, 2.5.2-2.5.5, 2.6.0, 2.7.0] or uninstalled, leaving only versions: [0.7.0, 0.8.0-0.8.10, 0.9.0-0.9.1, 0.10.0-0.10.1, 1.0.0-1.0.1, 2.0.0-2.0.1, 2.1.0-2.1.3, 2.2.0-2.2.1, 2.3.0-2.3.1, 2.4.0, 2.5.2-2.5.5, 2.6.0, 2.7.0]
 └─restricted by compatibility requirements with CUDAapi [3895d2a7] to versions: uninstalled — no versions left
   └─CUDAapi [3895d2a7] log:
     ├─possible versions are: [0.5.0-0.5.4, 0.6.0-0.6.3, 1.0.0-1.0.1, 1.1.0, 1.2.0, 2.0.0, 2.1.0, 3.0.0, 3.1.0, 4.0.0] or uninstalled
     └─restricted to versions 4.0.0 by an explicit requirement, leaving only versions 4.0.0

I have also tried to remove CUDAdrv and install CuArray but doesnt work please help

(v1.0) pkg> remove CUDAdrv
  Updating `~/.julia/environments/v1.0/Project.toml`
  [c5f51814] - CUDAdrv v6.1.0
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [fa961155] - CEnum v0.2.0
  [c5f51814] - CUDAdrv v6.1.0

(v1.0) pkg> add CuArrays
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package CuArrays [3a865a2d]:
 CuArrays [3a865a2d] log:
 ├─possible versions are: [0.2.1, 0.3.0, 0.4.0, 0.5.0, 0.6.0-0.6.2, 0.7.0-0.7.3, 0.8.0-0.8.1, 0.9.0-0.9.1, 1.0.0-1.0.2, 1.1.0, 1.2.0-1.2.1, 1.3.0, 1.4.0-1.4.7, 1.5.0, 1.6.0, 1.7.0-1.7.3] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.2.1, 0.3.0, 0.4.0, 0.5.0, 0.6.0-0.6.2, 0.7.0-0.7.3, 0.8.0-0.8.1, 0.9.0-0.9.1, 1.0.0-1.0.2, 1.1.0, 1.2.0-1.2.1, 1.3.0, 1.4.0-1.4.7, 1.5.0, 1.6.0, 1.7.0-1.7.3]
 ├─restricted by julia compatibility requirements to versions: [0.2.1, 0.3.0, 0.4.0, 0.5.0, 0.6.0-0.6.2, 0.7.0-0.7.3, 0.8.0-0.8.1, 0.9.0-0.9.1, 1.0.0-1.0.2, 1.1.0, 1.2.0-1.2.1, 1.3.0, 1.4.2-1.4.7, 1.5.0, 1.6.0] or uninstalled, leaving only versions: [0.2.1, 0.3.0, 0.4.0, 0.5.0, 0.6.0-0.6.2, 0.7.0-0.7.3, 0.8.0-0.8.1, 0.9.0-0.9.1, 1.0.0-1.0.2, 1.1.0, 1.2.0-1.2.1, 1.3.0, 1.4.2-1.4.7, 1.5.0, 1.6.0]
 └─restricted by compatibility requirements with CUDAapi [3895d2a7] to versions: 1.7.3 or uninstalled — no versions left
   └─CUDAapi [3895d2a7] log:
     ├─possible versions are: [0.5.0-0.5.4, 0.6.0-0.6.3, 1.0.0-1.0.1, 1.1.0, 1.2.0, 2.0.0, 2.1.0, 3.0.0, 3.1.0, 4.0.0] or uninstalled
     └─restricted to versions 4.0.0 by an explicit requirement, leaving only versions 4.0.0

You have a recent version of CUDAapi installed that is not compatible with the latest version of CUDAnative you can install (which itself isn’t the latest possible one due to Julia compatibility). Try downgrading CUDAapi.

CUDA.jl isn’t a registered package yet so you can’t install it.

1 Like

Thanks Mr.Tim i have removed CUDAapi and the problem seems to be resolved

(v1.0) pkg> remove CUDAapi
  Updating `~/.julia/environments/v1.0/Project.toml`
  [3895d2a7] - CUDAapi v4.0.0
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [3895d2a7] - CUDAapi v4.0.0

(v1.0) pkg> add CUDA
ERROR: The following package names could not be resolved:
 * CUDA (not found in project, manifest or registry)
Please specify by known `name=uuid`.

(v1.0) pkg> add CUDAnative
 Resolving package versions...
 Installed Adapt ────────────── v1.0.1
 Installed CUDAapi ──────────── v2.1.0
 Installed TimerOutputs ─────── v0.5.3
 Installed OrderedCollections ─ v1.1.0
 Installed DataStructures ───── v0.17.10
 Installed CUDAdrv ──────────── v5.1.0
 Installed CUDAnative ───────── v2.7.0
 Installed LLVM ─────────────── v1.3.4
  Updating `~/.julia/environments/v1.0/Project.toml`
  [be33ccc6] + CUDAnative v2.7.0
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [79e6a3ab] + Adapt v1.0.1
  [fa961155] + CEnum v0.2.0
  [3895d2a7] + CUDAapi v2.1.0
  [c5f51814] + CUDAdrv v5.1.0
  [be33ccc6] + CUDAnative v2.7.0
  [864edb3b] + DataStructures v0.17.10
  [929cbde3] + LLVM v1.3.4
  [bac558e1] + OrderedCollections v1.1.0
  [a759f4b9] + TimerOutputs v0.5.3