Manually installing Julia packages on Windows

4,017 views
Skip to first unread message

Able Mashamba

unread,
Oct 31, 2013, 12:01:29 PM10/31/13
to julia...@googlegroups.com
All Pkg.*() commands do not work on my Windows system which has a proxy.pac config file that is heavily protected by a paranoid firewall. How can I manually install the Julia packages that I have downloaded?

Avik Sengupta

unread,
Oct 31, 2013, 3:43:40 PM10/31/13
to julia...@googlegroups.com
For packages without native dependencies, copying them to HOME/.julia/<pkgname> should work. Eg c:\Users\xyz\.julia\JSON\  (note that the location has changed recently. This is for the rc2 binary and above). For packages with native dependencies, you will also have to download the binaries. Look in <pkgname>/deps/build.jl to see what is download. The downloaded dll's are usually placed in <pkgname>/deps/user/lib/[x86|x86-64]. But  if you have problems with loading the libraries, in the worst case, you can copy the dll's to the <julia install dir>\bin directory. That's messy, but works.

Regards
-
AVik

Jameson Nash

unread,
Oct 31, 2013, 5:14:53 PM10/31/13
to julia...@googlegroups.com
On Windows, the WinRPM packages uses Internet Explorer to do the internet access, so it should work through your firewall. 

Tobias Knopp

unread,
Nov 1, 2013, 4:29:30 AM11/1/13
to julia...@googlegroups.com
I have the same issue here on Windows with the julia RC2 from the homepage:

fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=No error

Tortoise git works fine. Any idea how to solve this issue?

Thanks

Tobias

Patrick O'Leary

unread,
Nov 1, 2013, 8:25:15 AM11/1/13
to julia...@googlegroups.com
Is it just that the git:// protocol is blocked? Try..

git config --global "https://github.com/".insteadOf git://github.com/

Tobias Knopp

unread,
Nov 1, 2013, 10:07:58 AM11/1/13
to julia...@googlegroups.com
This seems to work, thanks! But how can I tell Pkg to use https instead of git?

Stefan Karpinski

unread,
Nov 1, 2013, 10:11:40 AM11/1/13
to julia...@googlegroups.com
You just did :-)

Tobias Knopp

unread,
Nov 1, 2013, 10:18:34 AM11/1/13
to julia...@googlegroups.com
I run the git command using the  "run" command.

 run(`git clone -q -b metadata-v2 git://github.com/JuliaLang/METADATA.jl  METADATA`)

gives me an error, while

run(`git clone -q -b metadata-v2 https://github.com/JuliaLang/METADATA.jl  METADATA`)

works. But if I do Pkg.status, I still git

julia> Pkg.status()
INFO: Initializing package repository D:\Users\tknopp\.julia
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl

fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=No error

ERROR: failed process: Process(`git clone -q -b metadata-v2 git://github.com/Jul
iaLang/METADATA.jl METADATA`, ProcessExited(128)) [128]
 in pipeline_error at process.jl:476
 in success at process.jl:468
 in run at process.jl:453
 in info at util.jl:426

May I have to edit the Pkg.init function to use https?

Thanks for your help!

Stefan Karpinski

unread,
Nov 1, 2013, 10:47:06 AM11/1/13
to Julia Users
Seems like git doesn't change the protocol for URLs that are passed to it in certain ways. That's unfortunate and massively complicates making Pkg work through a firewall. It can probably be done, but it's a fairly major bit of work. In the meantime, I'm afraid you may be a bit hosed if you're behind a draconian firewall.

Patrick O'Leary

unread,
Nov 1, 2013, 11:02:32 AM11/1/13
to julia...@googlegroups.com
No, it's that I typed the config option wrong. The config key is prefixed with "url.":

git config --global url."https://github.com/".insteadOf git://github.com/

Adrian Torrie

unread,
Mar 31, 2014, 12:12:39 AM3/31/14
to julia...@googlegroups.com
I realise this question is old, but I recently had the same issue and was pointed to this thread. I have detailed a way to configure Git (in my example, the Git that can be found within the Julia folders) to get through an authenticated proxy that uses a script (on Windows), here: https://groups.google.com/d/msg/julia-users/W-H6ZxjXYSI/RWnc6bk6e-EJ
Reply all
Reply to author
Forward
0 new messages