pythonbuildjuliacondapycall

PyCall does not build - Fails at "Downloading miniconda installer"


Using Windows 10, Julia 1.1.1 (2019-05-16).

I've searched around online for various solutions, and have even resorted to totally removing Julia and reinstalling it, only to make no progress. Conda builds inside of Julia perfectly fine.

I'm calling the following code:

julia> import Pkg
julia> ENV["PYTHON"]=""
julia> Pkg.build("PyCall")

I have tried setting the python environment to a local Conda environment via ENV["PYTHON"]="conda activate py37 & python" which works in a command window to load the correct python environment activated (Note: I don't mind whether I use this externally created environment, or the default one that PyCall is meant to make via a standard build). I've also tried running Julia in administrator mode. Every time I keep getting the same response (though with extra path related content when I try specifying the external Conda environment):

julia> Pkg.build("PyCall")
  Building Conda ─→ `C:\Users\Student\.julia\packages\Conda\kLXeC\deps\build.log`
  Building PyCall → `C:\Users\Student\.julia\packages\PyCall\ttONZ\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: LoadError: failed process: Process(`'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe' -Version 3 -NoProfile -Command "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; (New-Object System.Net.Webclient).DownloadFile('https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Windows-x86_64.exe', 'C:\Users\Student\.julia\conda\3\installer.exe')"`, ProcessExited(3221225477)) [3221225477]
│ Stacktrace:
│  [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at .\error.jl:42
│  [2] pipeline_error at .\process.jl:785 [inlined]
│  [3] download(::String, ::String) at .\download.jl:20
│  [4] _install_conda(::String, ::Bool) at C:\Users\Student\.julia\packages\Conda\kLXeC\src\Conda.jl:160
│  [5] _install_conda(::String) at C:\Users\Student\.julia\packages\Conda\kLXeC\src\Conda.jl:152
│  [6] runconda(::Cmd, ::String) at C:\Users\Student\.julia\packages\Conda\kLXeC\src\Conda.jl:111
│  [7] #add#1(::String, ::Function, ::String, ::String) at C:\Users\Student\.julia\packages\Conda\kLXeC\src\Conda.jl:184
│  [8] add at C:\Users\Student\.julia\packages\Conda\kLXeC\src\Conda.jl:183 [inlined] (repeats 2 times)
│  [9] top-level scope at C:\Users\Student\.julia\packages\PyCall\ttONZ\deps\build.jl:84
│  [10] include at .\boot.jl:326 [inlined]
│  [11] include_relative(::Module, ::String) at .\loading.jl:1038
│  [12] include(::Module, ::String) at .\sysimg.jl:29
│  [13] include(::String) at .\client.jl:403
│  [14] top-level scope at none:0
│ in expression starting at C:\Users\Student\.julia\packages\PyCall\ttONZ\deps\build.jl:43
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\Pkg\src\Operations.jl:1075

Any thoughts?


Solution

  • After trying a bunch more things I finally discovered the solution:

    Resolve firewall and anti-virus conflicts

    After adding the relevant exceptions PyCall built fine.