# Loading a module locally without loading it on remote workers

**URL:** <https://discourse.julialang.org/t/loading-a-module-locally-without-loading-it-on-remote-workers/21266>\
**Category:** New to Julia\
**Created:** [February 27, 2019, 2:58pm UTC](https://discourse.julialang.org/t/loading-a-module-locally-without-loading-it-on-remote-workers/21266 "2019-02-27T14:58:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dapz](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@dapz](https://discourse.julialang.org/u/dapz)\
**Post date:** [February 27, 2019, 2:58pm UTC](https://discourse.julialang.org/t/loading-a-module-locally-without-loading-it-on-remote-workers/21266/1 "2019-02-27T14:58:22Z")

</div>

Hi, is there way to use a Module only locally?

If I create a remote worker (e.g. with ssh on a different machine), then when I run `using Module`, the module needs to be installed on the remote host as well (Otherwise I get “ERROR: on worker 2: ArgumentError: Package … is required but does not seem to be installed”).

The only command I’m aware of to do so would be `@fetchfrom 1 using Module`, but it does not work (ERROR: syntax: “using” expression not at top level).

I understand that it can make sense to load code everywhere (and actually, I thought we should use `@everywhere` in that case), but some packages are used only on the main process, and it’s useless to install them on other workers in that case.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [February 27, 2019, 6:14pm UTC](https://discourse.julialang.org/t/loading-a-module-locally-without-loading-it-on-remote-workers/21266/2 "2019-02-27T18:14:29Z")

</div>

I might be misunderstanding your question but isn’t the standard approach of `using LocalOnlyPackage` and `@everywhere using LocalAndRemotePackage` doing what you need?

---

<div class="post-metadata">

**Author:** ![dapz](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@dapz](https://discourse.julialang.org/u/dapz)\
**Post date:** [February 27, 2019, 7:00pm UTC](https://discourse.julialang.org/t/loading-a-module-locally-without-loading-it-on-remote-workers/21266/3 "2019-02-27T19:00:06Z")

</div>

Well that’s what I thought, but then why do I get a “package not installed” error from worker 2 when I run `using SomePackage` on proc 1? Is it a bug rather than the expected behavior?
