# Automatically install packages used in script

**URL:** <https://discourse.julialang.org/t/automatically-install-packages-used-in-script/102279>\
**Category:** General Usage\
**Created:** [July 31, 2023, 12:21am UTC](https://discourse.julialang.org/t/automatically-install-packages-used-in-script/102279 "2023-07-31T00:21:46Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![gitboy16](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gitboy16/32/24906_2.png) [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Post date:** [August 30, 2023, 8:27am UTC](https://discourse.julialang.org/t/automatically-install-packages-used-in-script/102279/6 "2023-08-30T08:27:22Z")

</div>

I had comparable requirements to yours. See below links.

> [@Using package / install automatically](https://discourse.julialang.org/t/using-package-install-automatically/70896):
>
> Hi, If I do using DataFrames and the package is not install, Julia 1.7 will ask me if I want to install it and I will have to type y or n. Is there a way to skip that step and have Julia installed the package if it is not available? Of course one can write a function that check if the package is installed or not and then install it. I was wondering if there is an option I can pass to using DataFrames that will automatically install the package if not installed? Could that be a feature reque…

> <https://github.com/JuliaLang/Pkg.jl/issues/3027>
>
> As suggested by @KristofferC in the following link:
> https://discourse.julialang….org/t/using-package-install-automatically/70896/5
> I am opening an issue so that maintainers can discuss whether they deem it useful or not to have an option to automatically install a package when using \`using\`. That option would bypass the prompt message asking whether the user wants to install the package or not.
> 
> Just speaking for myself here (i.e. not for other users), but when I use \`using X\`, I will probably answer yes 99% of the time to the question "do you want to install package X".
> 
> That option could be implemented via macro or env variable, I don't really have a strong view on it.
> 
> I just think it is a nice to have option.
> 
> Thank you

---

_[View the full topic](https://discourse.julialang.org/t/automatically-install-packages-used-in-script/102279)._
