Using <package name> and Pkg.add and misleading error messages?

Hi,

I already know how to use Julia, I’m just checking out 1.0 for the first time and I’m wondering if I found a bug. I did this:

Press Enter to start Julia.
Starting Julia…
_
_ _ ()_ | Documentation: https://docs.julialang.org
() | () () |
_ _ | | __ _ | Type “?” for help, “]?” for Pkg help.
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 1.0.0 (2018-08-08)
/ |_|||_’_| | Official https://julialang.org/ release
|__/ |
julia> using Plots
ERROR: ArgumentError: Package Plots not found in current path:

  • Run Pkg.add("Plots") to install the Plots package.
    […]

I know about Pkg3, but here it doesn’t say anything about Pkg3, so I tried running the command it says to run.

julia> Pkg.add(“Plots”)
ERROR: UndefVarError: Pkg not defined
[…]

I don’t need help with plots specifically. I was able to add this package by pressing ] and so on. I’m talking about what it says in the error messages.

Is this a bug or am I a moron?

Thanks,

S

You need import Pkg. A PR is open to clarify this https://github.com/JuliaLang/julia/pull/28555. It will likely be in 1.0.1.

Sounds good. :slight_smile: