3

I installed Julia 1.0 on my iMac running macOS High Sierra 10.13.6. I installed Julia and when I double click on it in my Applications folder, I get the expected screen shown below.

Julia Screen

But now that it's loaded it doesn't respond to commands as expected. In the instructions to set up Julia, I was instructed to load IJulia using the command Pkg.add("IJulia"). When I type this command I get the following message:

ERROR: UndefVarError: Pkg not defined

Stacktrace:
 [1] top-level scope at none:0

I've tried other commands to add packages and I get same error messages. Does anyone know why I can not load packages into Julia?

  • More appropriate for Stack Overflow? – Nimesh Neema Sep 6 '18 at 3:16
  • not really a programming question but i can try there. – jmh Sep 6 '18 at 3:18
  • In the instructions to set up Julia, I was instructed to load IJulia using the command Pkg.add("IJulia"). Can you add a link/reference to this? – Nimesh Neema Sep 6 '18 at 3:31
  • 1
    Here you go! juliaopt.org/install.pdf – jmh Sep 6 '18 at 3:36
2

Pkg.add not working #627

You need import Pkg first. Or use the repl mode with ] and then add IJulia.

Running import Pkg should resolve the issue.

  • Well I think that worked! I got other error messages but I think everything loaded! Wow - thanks for the help and quick reply! – jmh Sep 6 '18 at 3:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .