# How to test if package is installed

**URL:** <https://discourse.julialang.org/t/how-to-test-if-package-is-installed/3508>\
**Category:** General Usage\
**Tags:** question\
**Created:** [May 4, 2017, 6:18am UTC](https://discourse.julialang.org/t/how-to-test-if-package-is-installed/3508 "2017-05-04T06:18:47Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![BVPs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bvps/32/2190_2.png) [@BVPs](https://discourse.julialang.org/u/BVPs)\
**Post date:** [August 11, 2018, 8:14pm UTC](https://discourse.julialang.org/t/how-to-test-if-package-is-installed/3508/8 "2018-08-11T20:14:55Z")

</div>

Thanks a lot! However, if I put `using OhMyREPL` directly in my ~/.julia/config/startup.jl (v0.7/v1.0 replacement of ~/.juliarc.jl), then for normal Julia sessions, I don’t have any problem, but when I try to build Conda.jl, it somehow says that it cannot find OhMyREPL package and suggests that I should run `Pkg.add("OhMyREPL")` although I already added it.  
But then, I found an excellent solution posted by @Simon_Bolland:

> [@New Pkg: how to check if a package is installed?](https://discourse.julialang.org/t/new-pkg-how-to-check-if-a-package-is-installed/13141/3):
>
> I’d suggest using Pkg if in("OhMyREPL",keys(Pkg.installed())) @eval using OhMyREPL else @warn("OhMyREPL not installed") end

After putting this one in startup.jl, I haven’t got any error when building Conda.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-test-if-package-is-installed/3508)._
