Skip to content

Workers should inherit environment #675

@rened

Description

@rened

If I have a project where I installed MyPackage and I can say

julia --project -e "using MyPackage"

the following does only work when I manually activate the environment:

using Distributed
using MyPackage   # works
addprocs(3)
@everywhere
  using Pkg; Pkg.activate(".")  # required
  using MyPackage
  ...
end

I would suggest that workers inherit the environment that is active when they are added with addprocs. Should there be any calls to Pkg.activate after addprocs they have to be manually performed by the user on all workers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions