# DEPOT\_PATH undefined despite JULIA\_DEPOT\_PATH being defined in the Environment

**URL:** https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453
**Category:** New to Julia
**Tags:** question
**Created:** [January 16, 2020, 7:45pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453 "2020-01-16T19:45:37Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)
#### Post date: [January 16, 2020, 7:45pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/1 "2020-01-16T19:45:37Z")

</div>

I have had Julia1.2 installed on a remote linux server and can start it up and run commands, but cannot import any modules (e.g. ‘using Pkg’)

I get the error ERROR: LoadError: UndefVarError: DEPOT\_PATH not defined

All documents I have read say that this should not be an issue if JULIA\_DEPOT\_PATH is defined,  
which in my case it is (I can type ‘ENV’ at the Julia commandline and see it there pointing to the  
right places).

I tried various ways to manually set DEPOT\_PATH but none worked, and all advice online seems to say that I should not do this, but merely make sure JULIA\_DEPOT\_PATH is defined (which it is).  
So far, I have spent 16 hours trying to rectify this. Can anyone help?

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [January 17, 2020, 7:00am UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/2 "2020-01-17T07:00:28Z")

</div>

Most users don’t need to set either variable if they have a standard setup. So the first thing I would try is just not setting this manually, and use the standard setup.

How did you install Julia on the server?

I would just recommend getting the latest released version (1.3.x), and installing it in your home directory.

---

<div class="post-metadata">

### Author: ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)
#### Post date: [January 17, 2020, 7:53am UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/3 "2020-01-17T07:53:08Z")

</div>

I am responsible for the administration of the software used on our HPC and we also have a Julia 1.2 installation, which works fine by setting the `JULIA_DEPOT_PATH`:

```julia
░ tgal@cca010:~
░ 08:46:10 > module load julia/1.2.0
░ tgal@cca010:~
░ 08:46:28 > env|grep JULIA
JULIA_DEPOT_PATH=/pbs/home/t/tgal/.julia
░ tgal@cca010:~
░ 08:46:34 > julia --version
julia version 1.2.0

```

All I did there once was extracting the official Julia release (tar ball from [Download Julia](https://julialang.org/downloads/)) and set the `JULIA_DEPOT_PATH` based on the user’s home directory. No-one complained so far.

Then I tried to reproduce your problem with a fresh Docker container of Julia 1.2 but everything works:

```bash
░ tgal@staticbox:~
░ 08:47:50 > docker run -it julia:1.2 bash
Unable to find image 'julia:1.2' locally
1.2: Pulling from library/julia
000eee12ec04: Pull complete
7eaf7370ec9c: Pull complete
43d38792bfb3: Pull complete
Digest: sha256:61836817b814b6fb023a6c99148baf30ed684821b77e4a2ef64d9c476e67070a
Status: Downloaded newer image for julia:1.2
root@3b6dc6b96691:/# env|grep JULIA
JULIA_GPG=3673DF529D9049477F76B37566E3C7DC03D6E495
JULIA_VERSION=1.2.0
JULIA_PATH=/usr/local/julia
root@3b6dc6b96691:/# julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.2.0 (2019-08-20)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(v1.2) pkg> add PGFPlotsX
   Cloning default registries into `~/.julia`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
     Added registry `General` to `~/.julia/registries/General`
 Resolving package versions...
 Installed Requires ──────────── v1.0.0
 Installed Missings ──────────── v0.4.3
 Installed ArgCheck ──────────── v1.0.1
 Installed DataAPI ───────────── v1.1.0
 Installed Parameters ────────── v0.12.0
 Installed DocStringExtensions ─ v0.8.1
 Installed DataStructures ────── v0.17.9
 Installed PGFPlotsX ─────────── v1.2.1
 Installed SortingAlgorithms ─── v0.3.1
 Installed MacroTools ────────── v0.5.3
 Installed DefaultApplication ── v0.1.3
 Installed OrderedCollections ── v1.1.0
 Installed StatsBase ─────────── v0.32.0
  Updating `~/.julia/environments/v1.2/Project.toml`
  [8314cec4] + PGFPlotsX v1.2.1
  Updating `~/.julia/environments/v1.2/Manifest.toml`
  [dce04be8] + ArgCheck v1.0.1
  [9a962f9c] + DataAPI v1.1.0
  [864edb3b] + DataStructures v0.17.9
  [3f0dd361] + DefaultApplication v0.1.3
  [ffbed154] + DocStringExtensions v0.8.1
  [1914dd2f] + MacroTools v0.5.3
  [e1d29d7a] + Missings v0.4.3
  [bac558e1] + OrderedCollections v1.1.0
  [8314cec4] + PGFPlotsX v1.2.1
  [d96e819e] + Parameters v0.12.0
  [ae029012] + Requires v1.0.0
  [a2af1166] + SortingAlgorithms v0.3.1
  [2913bbd2] + StatsBase v0.32.0
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8ba89e20] + Distributed
  [b77e0a4c] + InteractiveUtils
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode

(v1.2) pkg>
root@3b6dc6b96691:/# ls
bin boot dev	etc home lib	lib64 media mnt opt	proc root run sbin srv sys tmp usr var
root@3b6dc6b96691:/# mkdir juliadepot
root@3b6dc6b96691:/# export JULIA_DEPOT_PATH=/juliadepot
root@3b6dc6b96691:/# julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.2.0 (2019-08-20)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(v1.2) pkg> st
    Status `/juliadepot/environments/v1.2/Project.toml`
  (empty environment)

(v1.2) pkg> add PGFPlotsX
   Cloning default registries into `/juliadepot`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
     Added registry `General` to `/juliadepot/registries/General`
 Resolving package versions...
 Installed Requires ──────────── v1.0.0
 Installed Missings ──────────── v0.4.3
 Installed DataAPI ───────────── v1.1.0
 Installed ArgCheck ──────────── v1.0.1
 Installed Parameters ────────── v0.12.0
 Installed DocStringExtensions ─ v0.8.1
 Installed PGFPlotsX ─────────── v1.2.1
 Installed DataStructures ────── v0.17.9
 Installed DefaultApplication ── v0.1.3
 Installed MacroTools ────────── v0.5.3
 Installed SortingAlgorithms ─── v0.3.1
 Installed StatsBase ─────────── v0.32.0
 Installed OrderedCollections ── v1.1.0
  Updating `/juliadepot/environments/v1.2/Project.toml`
  [8314cec4] + PGFPlotsX v1.2.1
  Updating `/juliadepot/environments/v1.2/Manifest.toml`
  [dce04be8] + ArgCheck v1.0.1
  [9a962f9c] + DataAPI v1.1.0
  [864edb3b] + DataStructures v0.17.9
  [3f0dd361] + DefaultApplication v0.1.3
  [ffbed154] + DocStringExtensions v0.8.1
  [1914dd2f] + MacroTools v0.5.3
  [e1d29d7a] + Missings v0.4.3
  [bac558e1] + OrderedCollections v1.1.0
  [8314cec4] + PGFPlotsX v1.2.1
  [d96e819e] + Parameters v0.12.0
  [ae029012] + Requires v1.0.0
  [a2af1166] + SortingAlgorithms v0.3.1
  [2913bbd2] + StatsBase v0.32.0
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8ba89e20] + Distributed
  [b77e0a4c] + InteractiveUtils
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode

julia> using PGFPlotsX
[Info: Precompiling PGFPlotsX [8314cec4-20b6-5062-9cdb-752b83310925]

julia>
root@3b6dc6b96691:/# ls juliadepot/
compiled environments	logs packages	registries
root@3b6dc6b96691:/# 

```

There is something missing in your environment description or something crucial you did not tell yet. If you really only set `JULIA_DEPOT_PATH`, it should work. Maybe you show the full output of `env | grep JULIA` and also tell us how you installed Julia.

---

<div class="post-metadata">

### Author: ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)
#### Post date: [January 17, 2020, 8:00am UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/4 "2020-01-17T08:00:29Z")

</div>

I repeated the whole exercise using the `Pkg` module directly instead of the package mode, which you activate by hitting `]`

It’s working too:

```bash
░ tgal@staticbox:~ took 7m 4s
░ 08:54:59 > docker run -it julia:1.2 bash
root@f7c4157d56b2:/# julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.2.0 (2019-08-20)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> using Pkg

julia> Pkg.add("UnicodePlots")
   Cloning default registries into `~/.julia`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
     Added registry `General` to `~/.julia/registries/General`
 Resolving package versions...
 Installed Missings ─────────── v0.4.3
 Installed DataAPI ──────────── v1.1.0
 Installed SortingAlgorithms ── v0.3.1
 Installed DataStructures ───── v0.17.9
 Installed StatsBase ────────── v0.32.0
 Installed UnicodePlots ─────── v1.1.0
 Installed OrderedCollections ─ v1.1.0
  Updating `~/.julia/environments/v1.2/Project.toml`
  [b8865327] + UnicodePlots v1.1.0
  Updating `~/.julia/environments/v1.2/Manifest.toml`
  [9a962f9c] + DataAPI v1.1.0
  [864edb3b] + DataStructures v0.17.9
  [e1d29d7a] + Missings v0.4.3
  [bac558e1] + OrderedCollections v1.1.0
  [a2af1166] + SortingAlgorithms v0.3.1
  [2913bbd2] + StatsBase v0.32.0
  [b8865327] + UnicodePlots v1.1.0
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8ba89e20] + Distributed
  [b77e0a4c] + InteractiveUtils
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [de0858da] + Printf
  [9a3f8284] + Random
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [8dfed614] + Test
  [4ec0a83e] + Unicode

julia> using UnicodePlots
[Info: Precompiling UnicodePlots [b8865327-cd53-5732-bb35-84acbb429228]

julia>
root@f7c4157d56b2:/# ls
bin boot dev	etc home lib	lib64 media mnt opt	proc root run sbin srv sys tmp usr var
root@f7c4157d56b2:/# mkdir juliadepot
root@f7c4157d56b2:/# export JULIA_DEPOT_PATH=/juliadepot
root@f7c4157d56b2:/# julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.2.0 (2019-08-20)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> using Pkg

julia> Pkg.status()
    Status `/juliadepot/environments/v1.2/Project.toml`
  (empty environment)

julia> Pkg.add("UnicodePlots")
   Cloning default registries into `/juliadepot`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
     Added registry `General` to `/juliadepot/registries/General`
 Resolving package versions...
 Installed DataAPI ──────────── v1.1.0
 Installed Missings ─────────── v0.4.3
 Installed SortingAlgorithms ── v0.3.1
 Installed OrderedCollections ─ v1.1.0
 Installed StatsBase ────────── v0.32.0
 Installed UnicodePlots ─────── v1.1.0
 Installed DataStructures ───── v0.17.9
  Updating `/juliadepot/environments/v1.2/Project.toml`
  [b8865327] + UnicodePlots v1.1.0
  Updating `/juliadepot/environments/v1.2/Manifest.toml`
  [9a962f9c] + DataAPI v1.1.0
  [864edb3b] + DataStructures v0.17.9
  [e1d29d7a] + Missings v0.4.3
  [bac558e1] + OrderedCollections v1.1.0
  [a2af1166] + SortingAlgorithms v0.3.1
  [2913bbd2] + StatsBase v0.32.0
  [b8865327] + UnicodePlots v1.1.0
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8ba89e20] + Distributed
  [b77e0a4c] + InteractiveUtils
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [de0858da] + Printf
  [9a3f8284] + Random
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [8dfed614] + Test
  [4ec0a83e] + Unicode

julia> using UnicodePlots
[Info: Precompiling UnicodePlots [b8865327-cd53-5732-bb35-84acbb429228]

julia>
root@f7c4157d56b2:/# ls juliadepot/
compiled environments	logs packages	registries
root@f7c4157d56b2:/# 

```

For the sake of completeness, all I did to install (any) Julia version is as said above, extracting the tar ball from the downloads page somewhere and set `PATH` and `LD_LIBRARY_PATH`. Here is the relevant part of the modules file I am using (I prefer [Environment Modules — Modules documentation](https://modules.readthedocs.io/en/latest/) to manage software):

```julia
set version 1.2.0
set pkgname Julia
set pkghome /pbs/throng/km3net/software/julia/$version
prepend-path PATH $pkghome/bin
prepend-path LD_LIBRARY_PATH $pkghome/lib
setenv JULIA_DEPOT_PATH $env(HOME)/.Julia

```

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [January 17, 2020, 11:12am UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/5 "2020-01-17T11:12:00Z")

</div>

`DEPOT_PATH` should always be defined, so I would guess that your install is broken somehow. Alternatively you are not running Julia 1.2, but maybe Julia 0.6 which does not have this variable. What is the full error message including stacktrace?

---

<div class="post-metadata">

### Author: ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)
#### Post date: [January 17, 2020, 2:46pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/6 "2020-01-17T14:46:43Z")

</div>

Thank you so much for your thoughts on this.

One piece of information I didn’t include (because I didn’t think it mattered and didn’t want to ‘overshare’) is that at the commandline, julia works fine, but in this case, I am calling a julia script from within another program (SCILAB in this case), where I explicitly set JULIA\_DEPOT\_PATH equal to the right value. The main thing I don’t understand is why, in this case, does Julia subsequently complain that DEPOT\_PATH is empty?  
Again, this is an installation that works normally from the commandline.

Thanks for any insights.  
PS If there were a way to set DEPOT\_PATH inside Julia, that might be a workaround, but julia seems to disallow this.

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [January 17, 2020, 2:52pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/7 "2020-01-17T14:52:03Z")

</div>

You first said:

> [@compleat](#):
>
> I get the error ERROR: LoadError: UndefVarError: DEPOT\_PATH not defined

but now:

> [@compleat](#):
>
> The main thing I don’t understand is why, in this case, does Julia subsequently complain that DEPOT\_PATH is empty?

Which one is it? If the latter then it just looks like you have set `JULIA_DEPOT_PATH` incorrectly which resulted in an empty `DEPOT_PATH`.

> [@compleat](#):
>
> PS If there were a way to set DEPOT\_PATH inside Julia, that might be a workaround, but julia seems to disallow this.

There is, you can do whatever with the `DEPOT_PATH` variable, but it is not recommended, you should use the `JULIA_DEPOT_PATH` for this.

---

<div class="post-metadata">

### Author: ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)
#### Post date: [January 17, 2020, 6:02pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/8 "2020-01-17T18:02:58Z")

</div>

Thanks for looking at this, it is the former… I thought not defined was the same as empty. As for JULIA\_DEPOT\_PATH, I set it to the same value that is used when I run Julia from the commandline (in which case all is fine). I even check it is the same value by printing out ENV(“JULIA\_DEPOT\_PATH”) which is the same in both cases. So why do you think it is that DEPOT\_PATH is not defined at all for the case in question? Is there a startup script which is supposed to run, where things happen, like defining DEPOT\_PATH from JULIA\_DEPOT\_PATH? Maybe that is not running. Can I run it explicitly? Thanks again for your help (this is driving me nuts!!! I have just lost a third nearly-full day on this, because if I don’t solve it, it means I have to go back to SCILAB ☹

The people on this (Ubuntu) server installed julia for me as a favour. I tried to make it as easy as possible for them, but there were no easy installers (snap is still on Julia1.0 and there were no ‘apt install’ -type solutions) so they had to configure everything by hand, and perhaps they didn’t get everything right. If at some point, someone builds an easy installer of Julia 1.2 or above for Ubuntu, maybe that would install everything correctly and I could come back to using Julia for this crucial application. [I would be appreciative if someone could alert me]

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [January 17, 2020, 8:22pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/9 "2020-01-17T20:22:16Z")

</div>

This is how I generally install Julia in (Ubuntu-based) docker images:

```julia
RUN cd /opt \
 && wget https://julialang-s3.julialang.org/bin/linux/x64/1.2/julia-1.2.0-linux-x86_64.tar.gz \
 && mkdir julia \
 && tar xvfz julia-1.2.0-linux-x86_64.tar.gz --strip-components 1 -C julia
ENV PATH /opt/julia/bin:$PATH

```

The URL is straight off the Julia Downloads page.

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [January 17, 2020, 9:01pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/10 "2020-01-17T21:01:39Z")

</div>

It is impossible to just guess what is wrong, you have to give more information. What are you setting `JULIA_DEPOT_PATH` to for example?

`DEPOT_PATH` is populated in the init funciton from `JULIA_LOAD_PATH`, and I don’t think there is a way to _not_ run it, so I think the problem is that your `JULIA_LOAD_PATH` just results in an empty `DEPOT_PATH`. What happens when you unset `JULIA_DEPOT_PATH`? Julias default should be OK.

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [January 18, 2020, 4:39pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/11 "2020-01-18T16:39:05Z")

</div>

> [@compleat](#):
>
> If at some point, someone builds an easy installer of Julia 1.2 or above for Ubuntu, maybe that would install everything correctly and I could come back to using Julia for this crucial application. [I would be appreciative if someone could alert me]

There is

> **[GitHub - abelsiqueira/jill: Command line installer of the Julia Language.](https://github.com/abelsiqueira/jill)**
>
> Command line installer of the Julia Language. Contribute to abelsiqueira/jill development by creating an account on GitHub.

and some other scripts floating around, but it is really, really easy to just download the tarball, extract it, and use it directly.

It should work without setting _anything_. You may have some stray settings around from earlier experimentation (in your shell config file, etc), make sure you remove those and log in again.

---

<div class="post-metadata">

### Author: ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)
#### Post date: [January 21, 2020, 3:56pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/12 "2020-01-21T15:56:30Z")

</div>

Hi Gunnar, Thank you for that. I do appreciate everyone trying to help me here, but I fear I am fighting a losing battle.

I tried your suggestion and it did not work: I got the following error

HTTP request sent, awaiting response… 200 OK  
Length: 91990555 (88M) [application/x-tar]  
julia-1.2.0-linux-x86\_64.tar.gz: Permission denied

Cannot write to \u2018julia-1.2.0-linux-x86\_64.tar.gz\u2019 (Success).

It says ‘success’ but there is no /opt/julia

Also the syntax ‘ENV PATH’ doesn’t seem to work in ubuntu

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [January 21, 2020, 4:21pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/13 "2020-01-21T16:21:46Z")

</div>

Installing into `/opt` is something an admin can do, but there’s nothing special about that directory. Try the following as a normal user:

```julia
cd $HOME
wget https://julialang-s3.julialang.org/bin/linux/x64/1.2/julia-1.2.0-linux-x86_64.tar.gz
mkdir julia1.2
tar xvfz julia-1.2.0-linux-x86_64.tar.gz --strip-components 1 -C julia1.2
export PATH=$HOME/julia1.2/bin:$PATH
julia

```

Change the paths if you want to install it somewhere else than `$HOME/julia1.2`.

> [@compleat](#):
>
> Also the syntax ‘ENV PATH’ doesn’t seem to work in ubuntu

That is [Docker](https://docs.docker.com/) syntax for modifying environment variables. I replaced it with the `export` command above.

---

<div class="post-metadata">

### Author: ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)
#### Post date: [January 21, 2020, 4:35pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/14 "2020-01-21T16:35:42Z")

</div>

Installation worked for my own linux server (thanks), but my main problem remains.

I am trying to use julia on a web server (i.e. as user www-data) administered by someone else, and I will try and get them to install it this way.

I am wondering, though, if all my issues with paths, etc. have to do with permissions and ownership as a web-user (i.e. use ‘www-data’) Has anyone ever run Julia as ‘www-data’?

* * *

\*\*\*\*\*\*\* UPDATE

After explicitly setting the JULIA\_LOAD\_PATH I (finally!!!) managed to get past the path error, but another error appeared:

ERROR: LoadError: LoadError: syntax: extra token “REPL” after end of expression  
while loading /opt/julias/julia-1.2.0/share/julia/stdlib/v1.2/Pkg/src/Pkg.jl, in expression starting on line 398  
while loading [my path] /julia\_bet\_test.jl, in expression starting on line 3

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [January 21, 2020, 6:05pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/15 "2020-01-21T18:05:35Z")

</div>

It’s pretty much impossible to debug this without having code to debug. If you could post some kind of example of what you’re trying to do, it would be possible to help. It seems like you’re trying to run Julia in some very unusual manner, but more than that I can’t say.

---

<div class="post-metadata">

### Author: ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)
#### Post date: [January 21, 2020, 6:08pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/16 "2020-01-21T18:08:35Z")

</div>

Hi Stefan,

Thanks again for your help.

All I am trying to do is execute

using Pkg

It took me a long while to get the path working, but that is working now - it is finding  
Pkg.jl, but running it seems to throw up an error:

ERROR: LoadError: LoadError: syntax: extra token “REPL” after end of expression  
while loading /opt/julias/julia-1.2.0/share/julia/stdlib/v1.2/Pkg/src/Pkg.jl, in expression starting on line 398

We are not talking about complicated code here, I just want to get this working so I can start my real work.

Thanks for any ideas. I really do appreciate everyone’s attempts to help me.

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [January 21, 2020, 6:14pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/17 "2020-01-21T18:14:21Z")

</div>

> [@compleat](#):
>
> We are not talking about complicated code here, I just want to get this working so I can start my real work.

It is very likely that the install is somehow a mess. As I [suggested a while ago](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/2), your best option may be installing a fresh extract of Julia a directory you have write access to (presumably somewhere inside `~`), at which point your troubles should be over.

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [January 21, 2020, 6:17pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/18 "2020-01-21T18:17:39Z")

</div>

One thing that can go wrong with unusual setups is that the user doesn’t have a `HOME` environment variable or that it’s pointing to a directory that doesn’t exist or is missing write permission. Try to run these from the Julia REPL:

```julia
ENV["HOME"]
write(joinpath(ENV["HOME"], "test"), "test")

```

---

<div class="post-metadata">

### Author: ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)
#### Post date: [January 21, 2020, 6:18pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/19 "2020-01-21T18:18:22Z")

</div>

Thanks, Tamas,

The people with access to the machine are running julia fine with this installation as users, so it is clear the installation is fine.

I am trying to run julia as a www-data user, and am having no end of issues…

Thanks again, D

---

<div class="post-metadata">

### Author: ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)
#### Post date: [January 21, 2020, 6:20pm UTC](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453/20 "2020-01-21T18:20:00Z")

</div>

Hi Gunnar,

Thank you

Indeed, I think something like that is the issue.

I will try what you suggestion. What should I look for?

Cheers,

D  
\*\*\*\*\* UPDATE \*\*\*\*  
I tried your suggestion, and got the following result (note I had explicitly set my home directory as /home/www/admin/ which seems fine):

ERROR: LoadError: MethodError: `write` has no method matching write(::ASCIIString, ::ASCIIString)  
Closest candidates are:  
write(!Matched::IO, ::ASCIIString)  
write(!Matched::IO, ::AbstractString)  
write{T\<:Base.AbstractPipe}(!Matched::T\<:Base.AbstractPipe, ::Any…)  
…

[Next page](https://discourse.julialang.org/t/depot-path-undefined-despite-julia-depot-path-being-defined-in-the-environment/33453.md?page=2)
