Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make REPL ask if you want to install a package, rather than throwing error? #35062

Closed
oxinabox opened this issue Mar 10, 2020 · 2 comments
Closed

Comments

@oxinabox
Copy link
Contributor

Right now if I using a package that is not installed in my current enviroment, julia errors.
It would be nice if the REPL was a bit more friendly and was like "Do you want to install it?"

Current behavour:

julia> using Example
ERROR: ArgumentError: Package Example not found in current path:
- Run `import Pkg; Pkg.add("Example")` to install the Example package.

Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:887

Not too bad, it tells you want command to run.
But better still would be to just give user option to run it.

Desired behavour

julia> using Example
ERROR: Package Example not found in current path:
Do you want to install the Example package? (Y/N)
> Y 
Running `import Pkg; Pkg.add("Example"); using Example`
...
julia>

MikTeX on windows does this (though with a GUI pop-up).
Julia and TeX are similar in that they are batteries not included, install dozens of packages to get things done.

@KristofferC
Copy link
Member

Ref #26469

@oxinabox
Copy link
Contributor Author

Closed by #39026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants