# How to add a package but only if it is not already there?

**URL:** <https://discourse.julialang.org/t/how-to-add-a-package-but-only-if-it-is-not-already-there/30674>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 4, 2019, 4:40am UTC](https://discourse.julialang.org/t/how-to-add-a-package-but-only-if-it-is-not-already-there/30674 "2019-11-04T04:40:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [November 4, 2019, 4:52am UTC](https://discourse.julialang.org/t/how-to-add-a-package-but-only-if-it-is-not-already-there/30674/2 "2019-11-04T04:52:07Z")

</div>

if this for your script and you just want to see if a package exists or not, [How to test if package is installed - #2 by fengyang.wang](https://discourse.julialang.org/t/how-to-test-if-package-is-installed/3508/2)

if you’re making a module with optional dependency, maybe you can try `Requires.jl`

---

_[View the full topic](https://discourse.julialang.org/t/how-to-add-a-package-but-only-if-it-is-not-already-there/30674)._
