How to solve the problem that the default installation path of the package is on the C drive??

How to solve the problem that the default installation path of the package is on the C drive? What are the issues with changing an environment variable to change the default installation path?

I added two new system environment variables:

JULIA_DEPOT_PATH = D:\Package\Julia\JuliaPackages;
D: \ Package, Julia, Julia - 1.11.1, local \ share \ Julia;
D: \ Package, Julia, Julia - 1.11.1 \ share \ Julia;

JULIA_LOAD_PATH = D:\Package\Julia\JuliaPackages;
@. @v#.#; @stdlib

Then add the following four paths to the system environment variable PATH:
D: \ Package, Julia, Julia - 1.11.1 \ bin;
D:\Package\Julia\JuliaPackages;
D: \ Package, Julia, Julia - 1.11.1, local \ share \ Julia;
D: \ Package, Julia, Julia - 1.11.1 \ share \ Julia;

D: \ Package, Julia, Julia - 1.11.1; It’s where Julia is,

D:\D:\Package\Julia\JuliaPackages; Is the path where I store the various packages I downloaded.
What’s wrong with this?

1 Like

after starting Julia, can you verify it actually picked up these environmental variables?

julia> DEPOT_PATH
3-element Vector{String}:
 "/home/akako/.julia"

Yes, here is the out put:

julia> DEPOT_PATH

3-element Vector{String}:
 "D:\\Package\\Julia\\JuliaPackages"
 "D:\\Package\\Julia\\Julia-1.11.1\\local\\share\\julia"
 "D:\\Package\\Julia\\Julia-1.11.1\\share\\julia"

In fact, before I added the above environment variables, the result of it looked like this:

julia> DEPOT_PATH

3-element Vector{String}:
 "C:\\Users\\myUserName"
 "D:\\Package\\Julia\\Julia-1.11.1\\local\\share\\julia"
 "D:\\Package\\Julia\\Julia-1.11.1\\share\\julia"

So I only changed the first path and left the other two paths untouched. Without adding the latter two paths, the environment cannot be correctly identified.

Blockquote

so in this case, does it work as expected now?

I think so. The package can be downloaded to the manually set path normally, but julia plots cannot be generated normally, and no error is reported.

However, the reason may have nothing to do with manually setting environment variables, because after deleting those environment variables, re-downloading VS Code and following the default path to download Plots, julia plots still cannot be generated.

I’m confused, it can execute code normally, but there are no plots. My computer was just factory reset yesterday, everything is brand new, but the problem is still there.

sounds like a VS Code / plotting library usage issue? maybe you can open a new thread and write down exactly what you did and what you see (what does “no plot and no error” mean?)