-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
missing packages still print out "use Pkg.add()
"
#28553
Comments
You need to load |
Thanks. That loads Pkg3 right? I fixed the issue by I agree a better error message will be more helpful for newcomers (and even some intermediate users like me). If you don't pointing out where this can be done, I'll be happy to do a PR. |
Yes, Pkg3 was renamed to Pkg.
Sure, here you go! diff --git a/base/loading.jl b/base/loading.jl
index 7feb1cdd26..f55f75498d 100644
--- a/base/loading.jl
+++ b/base/loading.jl
@@ -816,7 +816,7 @@ function require(into::Module, mod::Symbol)
if where.uuid === nothing
throw(ArgumentError("""
Package $mod not found in current path:
- - Run `Pkg.add($(repr(String(mod))))` to install the $mod package.
+ - Run `import Pkg; Pkg.add($(repr(String(mod))))` to install the $mod package.
"""))
else
s = """ |
Thanks, PR done. so for future reference |
This is why I had |
It would be good if we could add this back but fix the previous two problems:
|
Can we just put |
See
The text was updated successfully, but these errors were encountered: