# Error installing CuArrays

**URL:** <https://discourse.julialang.org/t/error-installing-cuarrays/17641>\
**Category:** GPU\
**Created:** [November 17, 2018, 12:07pm UTC](https://discourse.julialang.org/t/error-installing-cuarrays/17641 "2018-11-17T12:07:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seif\_Shebl](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Post date:** [November 17, 2018, 12:07pm UTC](https://discourse.julialang.org/t/error-installing-cuarrays/17641/1 "2018-11-17T12:07:25Z")

</div>

I’m facing the following errors when I try to install `CuArrays`. I use Julia 1.0.1 on a Windows 10 machine. The graphics card installed is the _GeForce GTX 980_. Any help is appreciated.

```julia
julia> using CuArrays
[Info: Precompiling CuArrays [3a865a2d-5b23-5a0f-bc46-62713ec82fae]
┌ Warning: CUDAnative.jl has not been successfully built, and will not work properly.
│ Please run Pkg.build("CUDAnative") and restart Julia.
└ @ CUDAnative C:\Users\Seif\.julia\packages\CUDAnative\AGfq2\src\init.jl:98
ERROR: LoadError: LoadError: UndefVarError: CUBLAS not defined
Stacktrace:
 [1] top-level scope at none:0 (repeats 2 times)
 [2] include at .\boot.jl:317 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1041
 [4] include at .\sysimg.jl:29 [inlined]
 [5] include(::String) at C:\Users\Seif\.julia\packages\CuArrays\f4Eke\src\CuArrays.jl:3
 [6] top-level scope at none:0
 [7] include at .\boot.jl:317 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1041
 [9] include(::Module, ::String) at .\sysimg.jl:29
 [10] top-level scope at none:2
 [11] eval at .\boot.jl:319 [inlined]
 [12] eval(::Expr) at .\client.jl:389
 [13] top-level scope at .\none:3
in expression starting at C:\Users\Seif\.julia\packages\CuArrays\f4Eke\src\deprecated.jl:5
in expression starting at C:\Users\Seif\.julia\packages\CuArrays\f4Eke\src\CuArrays.jl:42
ERROR: Failed to precompile CuArrays [3a865a2d-5b23-5a0f-bc46-62713ec82fae] to C:\Users\Seif\.julia\compiled\v1.0\CuArrays\7YFE0.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1187
 [4] _require(::Base.PkgId) at .\logging.jl:311
 [5] require(::Base.PkgId) at .\loading.jl:855
 [6] macro expansion at .\logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at .\loading.jl:837

```

And this happens when trying to build `CUDAnative`:

```julia
julia> Pkg.build("CUDAnative")
  Building LLVM ──────→ `C:\Users\Seif\.julia\packages\LLVM\mcS4Y\deps\build.log`
  Building CUDAdrv ───→ `C:\Users\Seif\.julia\packages\CUDAdrv\LC5XS\deps\build.log`
  Building CUDAnative → `C:\Users\Seif\.julia\packages\CUDAnative\AGfq2\deps\build.log`
┌ Error: Error building `CUDAnative`:
│ ERROR: LoadError: CUDA toolkit at doesn't contain nvcc
│ Stacktrace:
│ [1] error(::String) at .\error.jl:33
│ [2] find_toolkit_version(::Array{String,1}) at C:\Users\Seif\.julia\packages\CUDAapi\tF455\src\discovery.jl:268
│ [3] main() at C:\Users\Seif\.julia\packages\CUDAnative\AGfq2\deps\build.jl:114
│ [4] top-level scope at none:0
│ [5] include at .\boot.jl:317 [inlined]
│ [6] include_relative(::Module, ::String) at .\loading.jl:1041
│ [7] include(::Module, ::String) at .\sysimg.jl:29
│ [8] include(::String) at .\client.jl:388
│ [9] top-level scope at none:0
│ in expression starting at C:\Users\Seif\.julia\packages\CUDAnative\AGfq2\deps\build.jl:156
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1069

```

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [November 17, 2018, 12:41pm UTC](https://discourse.julialang.org/t/error-installing-cuarrays/17641/2 "2018-11-17T12:41:13Z")

</div>

> [@Seif\_Shebl](#):
>
> ERROR: LoadError: CUDA toolkit at doesn’t contain nvcc

I will try an install on Windows 10. You do have the CUDA toolkit installed? You might have to set some environment variables such that nvcc is found n the path.

---

<div class="post-metadata">

**Author:** ![Seif\_Shebl](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Post date:** [November 17, 2018, 12:58pm UTC](https://discourse.julialang.org/t/error-installing-cuarrays/17641/3 "2018-11-17T12:58:11Z")

</div>

Thank you John for the quick response. How can I know that CUDA toolkit is installed, if I remember correctly I think I installed it a year ago.

---

<div class="post-metadata">

**Author:** ![Seif\_Shebl](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Post date:** [November 17, 2018, 1:57pm UTC](https://discourse.julialang.org/t/error-installing-cuarrays/17641/4 "2018-11-17T13:57:45Z")

</div>

Thanks again John, reinstalling CUDA Toolkit fixed the issue.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [November 17, 2018, 2:01pm UTC](https://discourse.julialang.org/t/error-installing-cuarrays/17641/5 "2018-11-17T14:01:11Z")

</div>

No problems! Let us know on here what problem you are working on?

---

<div class="post-metadata">

**Author:** ![bocc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bocc/32/7546_2.png) [@bocc](https://discourse.julialang.org/u/bocc)\
**Post date:** [March 21, 2019, 8:12pm UTC](https://discourse.julialang.org/t/error-installing-cuarrays/17641/6 "2019-03-21T20:12:09Z")

</div>

Hello All, I am facing a problem like the original poster: when trying to eg. ‘test CuArrays’ in Pkg mode, it fails with a ‘LoadError: UndefVarError: CUBLAS not defined’ message.  
NVidia drivers are up to date (10.1), nvcc is working. I also tried it with both Juila 1.1 and 1.0.3, OS is Windows 10 x64.

Any help is greatly appreciated!

---

<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:** [March 22, 2019, 2:31pm UTC](https://discourse.julialang.org/t/error-installing-cuarrays/17641/7 "2019-03-22T14:31:51Z")

</div>

What is the output of `Pkg.build("CuArrays")` run with `JULIA_DEBUG="CUDAapi"` set in your environment? Also post the contents of `CuArrays/deps/ext.jl` (wherever `CuArrays` is, use `Base.find_package("CuArrays")`).
