1

In the IJulia Notebook I'm trying to add the packages, but I'm getting the error:

NameError: name 'Pkg' is not defined
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408

2 Answers2

3

Python was wrongly selected instead of Julia in Jupyter: enter image description here

Here's what happens in Julia: enter image description here

And here's what happens in Python: enter image description here

Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
0

For me I had a very similar error, and apparently you have to define Pkg if you're installing this for the first time. Just enter

using Pkg

It looks like in your case the issue was you were using python but this is a fix for another case where you get this exact same error.

haxonek
  • 174
  • 1
  • 2
  • 17