# Priority of environments

**URL:** <https://discourse.julialang.org/t/priority-of-environments/37873>\
**Category:** General Usage\
**Tags:** package\
**Created:** [April 20, 2020, 1:40am UTC](https://discourse.julialang.org/t/priority-of-environments/37873 "2020-04-20T01:40:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg\_plowman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/greg_plowman/32/8100_2.png) [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Post date:** [April 20, 2020, 1:40am UTC](https://discourse.julialang.org/t/priority-of-environments/37873/1 "2020-04-20T01:40:05Z")

</div>

**Summary:**  
**How can I install a package locally and on a server, where both locations are in `DEPOT_PATH` &/or `LOAD_PATH`, but local version takes priority?**

I have a setup with multiple machines, and for ease of management, I have configured “centralized” packages. I add and update packages on one machine and all others load from that machine. This has worked well for pure Julia packages, but there can be issues when there are binary dependencies. So I wanted to be able to install a few selected packages (the problematic ones with binary dependencies) on each machine but still have most packages load from the centralized depot.

With `DEPOT_PATH` and `LOAD_PATH` as follows:

```julia
DEPOT_PATH
"C:\\Users\\user\\.julia"
"\\\\Server\\Users\\user\\.julia"

```

```julia
LOAD_PATH
"@"
"@v#.#"
"@stdlib"

```

If `Pkg` environment has not been initialized on remote machine:

```julia
Base.load_path()
"\\\\Server\\Users\\user\\.julia\\environments\\v1.4\\Project.toml"
"C:\\Program Files\\Julia-1.4.1\\share\\julia\\stdlib\\v1.4"

```

If `Pkg` environment has been initialized on remote machine:

```julia
Base.load_path()
"C:\\Users\\user\\.julia\\environments\\v1.4\\Project.toml"
"C:\\Program Files\\Julia-1.4.1\\share\\julia\\stdlib\\v1.4"

```

But what I really want (I think) is the following:

```julia
Base.load_path()
"C:\\Users\\user\\.julia\\environments\\v1.4\\Project.toml"
"\\\\Server\\Users\\user\\.julia\\environments\\v1.4\\Project.toml"
"C:\\Program Files\\Julia-1.4.1\\share\\julia\\stdlib\\v1.4"

```

I can do this by adding the servers environment to LOAD\_PATH:

```julia
"@"
"@v#.#"
"@stdlib"
"\\\\Server\\Users\\user\\.julia\\environments\\v1.4\\Project.toml"

```

But this still doesn’t work.

If I add a package, it presumably updates the local `Project.toml`, but does not install the package locally. If that package has a binary dependency, it can run/load properly.

Is there a way to selectively install packages locally as well as loading from a server?
