How to change default save location for downloaded package with "add" command?

hi guys
i am a newbie Julia
i have created my own environment and named it “demo”, i want the downloaded packages to be in the demo folder, i have activated the demo environment, why when i use the command “add PyCall” the packages get installed put in folder C? I don’t want to use C folder for installing package.

(before i used node js for package installation when i install package for project, it is installed into the node_modules directory, which comes with the project)

please help me, i am using julia 1.6

because it’s a waste of time and space to duplicate registry and package source code and cached compiled code for every single environment on your computer. The environment only needs to record (content of Manifest.toml) what packages and what versions you have, not the registry (which has information about every package) or the source code of the packages (they are read-only anyway).

If you want to change where the deposition of registry and package sources happen:


Note that the Manifest.toml will have all the information you need to fully reproduce your code. You don’t need to worry about the pacakges living alongside your code for maximum reproducibility.

1 Like

my computer don’t have much space on C Drive, I don’t want the downloaded packages to be on C drive, how can I download and save the downloaded package located in the folder that comes with the project?

Read the link in jling’s reply.

i read it but i did’t get it, I can’t do it, it’s too hard to visualize the steps to do. because i don’t understand it technically and i’m not a native english speaker, anyone have a video tutorial on this?
maybe i have to give up julia, no one helps me.

could you please take a moment to make a demonstration video for me, i have read that article, but i don’t understand how to do it, i don’t know what is environment variable? i don’t know what step to config or setup are

Perhaps this video will help you: Add/edit PATH environment variable in Windows 10 - YouTube

1 Like

i don’t know what variable name and variable value need to fill in are


value: /foo/bar:$JULIA_DEPOT_PATH

where /foo/bar is the folder you would like .julia to be instead.

1 Like

i did it,is it like this?

after I add environment variable: JULIA_DEPOT_PATH, I type Julia in power shell, I get this error.

i tried creating a new project with pkg command and downloaded the package, but i got this error

now i understand because ```

Is it working now?
If not, you could try something like this for the variable value in the screenshot
you may need to create the folder (although it looks like Julia tries this anyway)
I don’t think you want the depot to in the install directory of the software itself.

1 Like

thanks i solved by your ways