# Cannot install CUDAnative with Pkg3 (Pkg can)

**URL:** <https://discourse.julialang.org/t/cannot-install-cudanative-with-pkg3-pkg-can/10865>\
**Category:** General Usage\
**Created:** [May 13, 2018, 3:52am UTC](https://discourse.julialang.org/t/cannot-install-cudanative-with-pkg3-pkg-can/10865 "2018-05-13T03:52:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roger-luo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roger-luo/32/3399_2.png) [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Post date:** [May 13, 2018, 3:52am UTC](https://discourse.julialang.org/t/cannot-install-cudanative-with-pkg3-pkg-can/10865/1 "2018-05-13T03:52:05Z")

</div>

I tried Pkg3 with a local built master branch. But I cannot install CUDAnative with it. It seems that the version does not match? But I can install it with Pkg.

Here is the error:

```julia
julia> Pkg3.add("CuArrays")
  Updating registry at `~/.julia/registries/Uncurated`
  Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package CuArrays [3a865a2d]:
 CuArrays [3a865a2d] log:
 ├─possible versions are: [0.1.0-0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0, 0.5.0] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.1.0-0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0, 0.5.0]
 ├─restricted by compatibility requirements with CUDAapi [3895d2a7] to versions: [0.1.0-0.1.1, 0.4.0, 0.5.0] or uninstalled, leaving only versions: [0.1.0-0.1.1, 0.4.0, 0.5.0]
 │ └─CUDAapi [3895d2a7] log:
 │ ├─possible versions are: [0.1.0-0.1.3, 0.2.0-0.2.1, 0.3.0-0.3.1, 0.4.0-0.4.2] or uninstalled
 │ ├─restricted by compatibility requirements with CUDAnative [be33ccc6] to versions: 0.4.0-0.4.2
 │ │ └─CUDAnative [be33ccc6] log:
 │ │ ├─possible versions are: [0.1.0-0.1.3, 0.2.0, 0.3.0-0.3.1, 0.4.0-0.4.2, 0.5.0-0.5.5, 0.6.0-0.6.3, 0.7.0, 0.8.0-0.8.1] or uninstalled
 │ │ └─restricted to versions 0.8.1 by an explicit requirement, leaving only versions 0.8.1
 │ └─restricted by compatibility requirements with CUDAdrv [c5f51814] to versions: 0.4.2
 │ └─CUDAdrv [c5f51814] log:
 │ ├─possible versions are: [0.1.0-0.1.1, 0.2.0-0.2.4, 0.3.0-0.3.1, 0.4.0-0.4.2, 0.5.0-0.5.4, 0.6.0-0.6.1, 0.7.0-0.7.8, 0.8.0-0.8.3] or uninstalled
 │ ├─restricted by compatibility requirements with CuArrays [3a865a2d] to versions: [0.5.0-0.5.4, 0.6.0-0.6.1, 0.7.0-0.7.8, 0.8.0-0.8.3]
 │ │ └─CuArrays [3a865a2d] log: see above
 │ └─restricted by compatibility requirements with CUDAnative [be33ccc6] to versions: 0.8.3
 │ └─CUDAnative [be33ccc6] log: see above
 ├─restricted by compatibility requirements with CUDAdrv [c5f51814] to versions: [0.4.0, 0.5.0] or uninstalled, leaving only versions: [0.4.0, 0.5.0]
 │ └─CUDAdrv [c5f51814] log: see above
 └─restricted by compatibility requirements with CUDAapi [3895d2a7] to versions: 0.1.0-0.1.1 or uninstalled — no versions left
   └─CUDAapi [3895d2a7] log: see above

Stacktrace:
 [1] #propagate_constraints!#61(::Bool, ::Function, ::Pkg3.GraphType.Graph, ::Set{Int64}) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/GraphType.jl:1005
 [2] propagate_constraints! at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/GraphType.jl:946 [inlined]
 [3] #simplify_graph!#123(::Bool, ::Function, ::Pkg3.GraphType.Graph, ::Set{Int64}) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/GraphType.jl:1460
 [4] simplify_graph! at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/GraphType.jl:1460 [inlined] (repeats 2 times)
 [5] resolve_versions!(::Pkg3.Types.Context, ::Array{Pkg3.Types.PackageSpec,1}) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/Operations.jl:287
 [6] #add_or_develop#54(::Array{Base.UUID,1}, ::Function, ::Pkg3.Types.Context, ::Array{Pkg3.Types.PackageSpec,1}) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/Operations.jl:963
 [7] #add_or_develop at ./<missing>:0 [inlined]
 [8] #add_or_develop#8(::Symbol, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg3.Types.Context, ::Array{Pkg3.Types.PackageSpec,1}) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:38
 [9] #add_or_develop at ./<missing>:0 [inlined]
 [10] #add_or_develop#7 at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:22 [inlined]
 [11] #add_or_develop at ./<missing>:0 [inlined]
 [12] #add_or_develop#6 at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:21 [inlined]
 [13] #add_or_develop at ./<missing>:0 [inlined]
 [14] #add_or_develop#5 at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:20 [inlined]
 [15] (::getfield(Pkg3.API, Symbol("#kw##add_or_develop")))(::NamedTuple{(:mode,),Tuple{Symbol}}, ::typeof(Pkg3.API.add_or_develop), ::String) at ./<missing>:0
 [16] #add#9(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::String, ::Vararg{String,N} where N) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:43
 [17] add(::String, ::Vararg{String,N} where N) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:43
 [18] top-level scope

```

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [May 14, 2018, 9:34am UTC](https://discourse.julialang.org/t/cannot-install-cudanative-with-pkg3-pkg-can/10865/2 "2018-05-14T09:34:48Z")

</div>

I might be misinterpreting this output, but it seems like CUDAnative is forced at 0.8.1 (“by an explicit requirement”, whatever that means), which forces a CUDAapi version that is incompatible with current CuArrays.

Also, you seem to be working with Julia 0.7, which CuArrays/GPUArrays in general isn’t compatible with. CUDAnative itself is.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [May 14, 2018, 9:49am UTC](https://discourse.julialang.org/t/cannot-install-cudanative-with-pkg3-pkg-can/10865/3 "2018-05-14T09:49:51Z")

</div>

There’s been a small bugfix to how the dependencies are collected in Pkg3 on a recent master. I have no problems adding the package on latest master:

```julia
julia> Pkg3.add("CuArrays")
  Updating registry at `~/.julia/registries/Uncurated`
  Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
 Resolving package versions...
Downloaded AbstractFFTs ─ v0.2.1
Downloaded Adapt ──────── v0.2.0
Downloaded CUDAapi ────── v0.4.1
Downloaded GPUArrays ──── v0.2.4
Downloaded NNlib ──────── v0.3.0
Downloaded CUDAdrv ────── v0.8.1
Downloaded CuArrays ───── v0.5.0
Downloaded CUDAnative ─── v0.7.0
Downloaded MacroTools ─── v0.4.0
Downloaded LLVM ───────── v0.9.8
...

```

---

<div class="post-metadata">

**Author:** ![Roger-luo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roger-luo/32/3399_2.png) [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Post date:** [May 14, 2018, 7:11pm UTC](https://discourse.julialang.org/t/cannot-install-cudanative-with-pkg3-pkg-can/10865/4 "2018-05-14T19:11:29Z")

</div>

Yeah, I was testing if it works on v0.7, because I want to use it in my package. It seems that I cannot build `CuArrays` on v0.7 indeed.

---

<div class="post-metadata">

**Author:** ![Roger-luo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roger-luo/32/3399_2.png) [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Post date:** [May 14, 2018, 7:12pm UTC](https://discourse.julialang.org/t/cannot-install-cudanative-with-pkg3-pkg-can/10865/5 "2018-05-14T19:12:11Z")

</div>

What’s your versioninfo?

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [May 14, 2018, 8:25pm UTC](https://discourse.julialang.org/t/cannot-install-cudanative-with-pkg3-pkg-can/10865/6 "2018-05-14T20:25:13Z")

</div>

CuArrays should work on the most recent 0.6.

For 0.7, you’ll have to wait on [https://github.com/JuliaGPU/GPUArrays.jl/pull/108](https://github.com/JuliaGPU/GPUArrays.jl/pull/108) before CuArrays works. But as I said, CUDAnative should work just fine on a recent checkout.

---

<div class="post-metadata">

**Author:** ![Roger-luo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roger-luo/32/3399_2.png) [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Post date:** [May 16, 2018, 6:37am UTC](https://discourse.julialang.org/t/cannot-install-cudanative-with-pkg3-pkg-can/10865/7 "2018-05-16T06:37:49Z")

</div>

I see, thanks for the reply!
