UArgumentError: Package ... not found in current path

I used Pluto to create a file with julia 1.9.

But when I want to execute the file in Visual Studio Code I always get the error:

UArgumentError: sPackage … not found in current path.

  • Run import Pkg; Pkg.add("..") to install the … package.e

Which makes me wonder because:

  1. I use julia 1.9, should not julia install the packages now
  2. I used the packages within pluto. The are installed.

Hence I assume from the message, that this is a path error, just I do not get what the error is.

I used VSC code on Ubuntu 20.04 and Windows 10.

Pluto has a built in package manage which creates a notebook specific environment in which package are installed. The Manifest is embedded in the notebook.

Code in VSCode will generally use the default environment, or some other environment it detects (if the folder you’re working in has a project and manifest file, I believe).

If you want to go back and forth between Pluto and non Pluto usage it’s probably easiest to disable Pluto’s package manager and create a project environment in the folder that your code lives in (import Pkg; Pkg.activate(".")), you can then activate this environment from VSCode in the same way.

1 Like

Thanks @nilshg . That works.
I just ad to add the packges as Pkg.add() now. That, that is not needed anymore.