How do you change the default location for package installation in Windows?

4,356 views
Skip to first unread message

Dave Ramsey

unread,
Nov 6, 2013, 7:20:54 PM11/6/13
to julia...@googlegroups.com
Hi,  Newbie question here.   I am using Julia v0.2-rc2 on a 32 bit Windows 7 machine.   I wish to change the default location of my installed packages (i.e. the location of my .julia folder).  There doesn't appear to be anything relevant in the package documentation or the list that I can find?   Since upgrading from 0.2prerelease I can no longer install packages and was wondering if the new default package location is the cause (I'm behind a work network).   

thanks for you help
Dave



Elliot Saba

unread,
Nov 7, 2013, 2:33:23 AM11/7/13
to julia...@googlegroups.com
Hello there!  You can set the JULIA_PKGDIR environment variable to a different directory, and that will change where the packages are stored.  (It will not create a .julia directory inside of whatever JULIA_PKGDIR points to, so for instance you set JULIA_PKGDIR equal to "C:\Users\MyUsername\JuliaPackages" and it would store the packages directory inside that folder).

Could you post the error that it is encountering?  Permissions likely should not be an issue on your local disk, as we take pains to choose default locations you should have write access to.
-E

Dave Ramsey

unread,
Nov 7, 2013, 6:00:28 PM11/7/13
to julia...@googlegroups.com
Hi,  thanks for the reply.   That appeared to work.   For others that will read this post you need to modify the file prepare-julia-env.bat and add the line (for example)
set JULIA_PKGDIR=c:\users\xxx\juliapackages

or something similar.  Out of the box Julia v0.2 rc2 was creating the .julia folder on one of my network drives  H:\.julia and there were some permission problems associated with package installation.   Setting the package directory to a local drive solved the problem.   Why Julia was going to a network drive in the first place a mystery.   As my previous post mentioned the v0.2prerelease version did not do this.  

Thanks again for your help
cheers
Dave

Isaiah Norton

unread,
Nov 7, 2013, 6:04:11 PM11/7/13
to julia...@googlegroups.com
  As my previous post mentioned the v0.2prerelease version did not do this.  

Yes, we used to use %APPDATA% ... perhaps your domain admins have configured that to be local, or with different permissions. See this issue for rationale:

Dave Ramsey

unread,
Nov 7, 2013, 9:29:13 PM11/7/13
to julia...@googlegroups.com
Ok that thread explains it.  The current configuration makes sense and It works perfectly on my home machine.   We do have write permissions on our home (roaming) directory.  However, for some reason the network drive was causing package installation to crash.  Not sure why.  Happy with the current workaround.

cheers
Dave

Freddy Svensson

unread,
Sep 9, 2014, 11:25:44 AM9/9/14
to julia...@googlegroups.com
Hi, can you show exactly how to change prepare-julia-env.bat to have JULIA_PKGDIR and other ENV variables preset when Julia loads, adding an empty line and then set JULIA_PKGDIR=C:\julia_pkg does not work for me.

Thanks, FS

email.r...@gmail.com

unread,
Jan 7, 2015, 7:20:08 AM1/7/15
to julia...@googlegroups.com
I've just been through this too. The trouble is probably common to anyone using Julia in a workplace with Windows and no administrator rights (so that network drive is always popping up). I wrote a julia.bat file:
set JULIA_PKGDIR=D:\Julia.0.3.2
set HOME=D:\Julia.0.3.2
D:\Julia-0.3.2\bin\julia.exe

which in my case points to D:\Julia0.3.2 where I have locally installed. Then use that julia.bat file to start it each time.

Páll Haraldsson

unread,
Jan 7, 2015, 4:07:44 PM1/7/15
to julia...@googlegroups.com


On Thursday, November 7, 2013 12:20:54 AM UTC, Dave Ramsey wrote:
Hi,  Newbie question here.   I am using Julia v0.2-rc2 on a 32 bit Windows 7 machine.   I wish to change the default location of my installed packages (i.e. the location of my .julia folder).  There doesn't appear to be anything relevant in the package documentation or the list that I can find?   Since upgrading from 0.2prerelease I can no longer install packages and was wondering if the new default package location is the cause (I'm behind a work network).   

I wander why 0.2 (meaning not 0.3.4)? Not that I think it would matter for your problem (I wouldn't know). I just know a friend who had problems with Julia at work, because of firewall issues (for packages I think, he didn't get to much into the problem and gave up). I assume(d) he'd just have to work that out as it in not Julia's fault or anything it can do to open firefalls. Maybe that was just a misunderstanding.

Ivar Nesje

unread,
Jan 7, 2015, 4:30:12 PM1/7/15
to julia...@googlegroups.com
>I wander why 0.2 (meaning not 0.3.4)?

Probably because this is a really old thread.

Robert Grant

unread,
Jan 8, 2015, 1:32:27 AM1/8/15
to julia...@googlegroups.com

Yes, but sysadmin in Windows workplaces is driving this, not Julia. I have to jump through similar hoops with other software too.

Reply all
Reply to author
Forward
0 new messages