# Overriding default proxy setup in Julia for Windows

**URL:** <https://discourse.julialang.org/t/overriding-default-proxy-setup-in-julia-for-windows/57159>\
**Category:** General Usage\
**Created:** [March 15, 2021, 2:00am UTC](https://discourse.julialang.org/t/overriding-default-proxy-setup-in-julia-for-windows/57159 "2021-03-15T02:00:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wsshin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wsshin/32/360_2.png) [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Post date:** [March 15, 2021, 2:00am UTC](https://discourse.julialang.org/t/overriding-default-proxy-setup-in-julia-for-windows/57159/1 "2021-03-15T02:00:55Z")

</div>

I am a Mac user, but need to test Julia on Windows for my work at the job. During `pkg> add PyCall`, I get the following error message during the build procedure (reproduced by `pkg> build PyCall`):

```julia
pkg> build PyCall                                                                                                  
Building Conda ─→ `C:\Users\<my user name>\.julia\packages\Conda\tJJuN\deps\build.log`                                         
Building PyCall → `C:\Users\<my user name>\.julia\packages\PyCall\tqyST\deps\build.log`
┌ Error: Error building `PyCall`:                                                                                      
│ ┌ Info: Using the Python distribution in the Conda package by default.                                                
│ └ To use a different Python version, set ENV["PYTHON"]="pythoncommand" and re-run Pkg.build("PyCall").                
│ [ Info: Downloading miniconda installer ...                                                                           
│ ┌ Error: Download failed: curl: (4) Unsupported proxy 'https://<my job's proxy URL and port number>', libcurl is built without the HTTPS-proxy support.                                                                                               
│ └ @ Base download.jl:43                                                                                              
│ ERROR: LoadError: failed process: Process(`'C:\WINDOWS\System32\curl.exe' -s -S -g -L -f -o 'C:\Users\<my user name>\.julia\conda\3\installer.exe' https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe`, ProcessExited(4)) [4]  
(rest of error messages omitted)

```

From the error messages, it seems that the error could be eliminated if the proxy setup is changed from HTTPS to HTTP. I know how to do this on Mac, but how can I override the proxy setup used in Julia on Windows? I installed Julia using the installer downloaded from [https://julialang.org/downloads/](https://julialang.org/downloads/).

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [March 15, 2021, 8:48am UTC](https://discourse.julialang.org/t/overriding-default-proxy-setup-in-julia-for-windows/57159/2 "2021-03-15T08:48:01Z")

</div>

Setting environment variables seem to be the solution:

> [@Install packages behind the proxy](https://discourse.julialang.org/t/install-packages-behind-the-proxy/23298):
>
> Hi everyone! I try to use Julia in my current job. But have trouble with installing packages behind the proxy. I use 1.1.0 binaries. error massage: julia\> Pkg.add(“IJulia”) Cloning default registries into ~/.julia Cloning registry from “[GitHub - JuliaRegistries/General: The official registry of general Julia packages](https://github.com/JuliaRegistries/General.git)” ERROR: failed to clone from [GitHub - JuliaRegistries/General: The official registry of general Julia packages](https://github.com/JuliaRegistries/General.git), error: GitError(Code:ERROR, Class:Net, curl error: Unsupported…

But this is a problem which pops up regularily, so perhaps it is something more complex than just setting environment variables and depends on other things too. Just give it a try and report back.

In above thread this has worked:

> You can add these lines to `~/.julia/config/startup.jl` , which will execute on each new Julia session:
> 
> ```julia
> ENV["HTTP_PROXY"] = "http://proxy.osmp.ru:3128"
> ENV["HTTPS_PROXY"] = "http://proxy.osmp.ru:3128"
> 
> ```

Credits go to @felipenoris

---

<div class="post-metadata">

**Author:** ![wsshin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wsshin/32/360_2.png) [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Post date:** [March 18, 2021, 2:29am UTC](https://discourse.julialang.org/t/overriding-default-proxy-setup-in-julia-for-windows/57159/3 "2021-03-18T02:29:16Z")

</div>

Thanks for the hints, @oheil. I was able to solve the issue by setting the environmental variables `HTTP_PROXY` and `HTTPS_PROXY` by following the instructions shown in [https://julialang.org/downloads/platform/#adding\_julia\_to\_path\_on\_windows\_10](https://julialang.org/downloads/platform/#adding_julia_to_path_on_windows_10). For now, this is the easiest way for me to set those environment variables, because I am not even familiar with the text editors on Windows. (I failed to figure out how to eliminate the default text file extension `.txt` from `startup.jl.txt`.)

After setting those environment variables, `pkg> build PyCall` worked fine. Hope this solution is useful for other people experiencing similar problems.
