julia> using MuladdMacro
julia> @everywhere using MuladdMacro
ERROR: On worker 2:
ArgumentError: Package MuladdMacro not found in current path:
- Run `import Pkg; Pkg.add("MuladdMacro")` to install the MuladdMacro package.
I’ve seen tonnes of posts on this, and none of them offered a fix to my problem. I’ve never had JuliaPro on this laptop, which is a common cause of this error apparently.
I am not sure if I understand. Are your workers in the same machine? If one of your workers is in a remote machine and you do not have your package installed there, it cannot load the package. To be sure they are installed, do what the message says, and at least one time call:
When you start your julia session are you in a particular environment? that is, are you doing julia --project=/some/project , or alternatively, are you changing the environment programatically once Julia is launched i.e ] activate env
If you are using an environment/project (i.e., Project.toml/Manifest.toml files) it may be necessary to call Pkg.activate("path/to/folder/with/toml/files/") in the workers (with @everywhere). Also, note that @everywhere only executes the code in the workers currently running. So if you do some setup with @everywhere before calling addprocs (or some other method to create workers) those newly created workers will not have executed the setup you did with @everywhere before.
It seems like I wasn’t starting up in the default environment. Thanks! VSCode automatically starts up in the folder environment if the folder is a package.
I personally don’t agree that the idea of this issue should be implemented (unless there is an explicit command by the user to do so), but it explains the problem that you’re hitting.