UndefVarError: Images not defined VS Code Julia

Viewed 118

I created a new Jupyter notebook and I am trying to run using Metalhead.Images in the first cell but it errors out. I checked my environment in the notebook and it is set to my default Julia 1.6.3 install. I opened my Julia REPL with Julia 1.6.3 and get no issues when running the command. I double-checked using versioninfo() in the notebook and it shows Julia 1.6.3 so it is definitely pointing to the right place, but for some reason won't let me use the package.

1 Answers

As it turns out, there were two issues here:

  • VS Code was automatically activating my current env instead of my default Julia 1.6.3 env. I switched it via the package commands
  • I also needed to re-start the Julia kernel even after switching the env

You can read more about re-starting the Julia kernel here: How to re-start the Julia kernel in VS Code?

Related