# Download package in julia

**URL:** <https://discourse.julialang.org/t/download-package-in-julia/85445>\
**Category:** General Usage\
**Created:** [August 7, 2022, 7:27pm UTC](https://discourse.julialang.org/t/download-package-in-julia/85445 "2022-08-07T19:27:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JosieG](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josieg/32/36221_2.png) [@JosieG](https://discourse.julialang.org/u/JosieG)\
**Post date:** [August 7, 2022, 7:27pm UTC](https://discourse.julialang.org/t/download-package-in-julia/85445/1 "2022-08-07T19:27:02Z")

</div>

Hi, I want to download kNN package in julia. The link is [KNN · Julia Packages](https://juliapackages.com/p/knn)  
My code is

```julia
using Pkg
Pkg.add("kNN")

```

And I got error

> - kNN (not found in project, manifest or registry)

But I can download other packages successfully. So how to download kNN successfully? Thank you in advance!

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [August 7, 2022, 7:33pm UTC](https://discourse.julialang.org/t/download-package-in-julia/85445/2 "2022-08-07T19:33:33Z")

</div>

I think the function requires `PackageSpec`: [12. API Reference · Pkg.jl](https://pkgdocs.julialang.org/v1/api/#Pkg.add)  
But this should work: `]add kNN`.

Edit: Actually I think the problem is the package is not registered. The Github website also suggests to use a package that superseded this one: [GitHub - KristofferC/NearestNeighbors.jl: High performance nearest neighbor data structures and algorithms for Julia.](https://github.com/KristofferC/NearestNeighbors.jl)  
Like so `]add NearestNeighbors`. Because _that_ package _is_ registered.
