PyCall 未构建 - 在 "Downloading miniconda installer" 时失败

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

使用 Windows10,Julia 1.1.1 (2019-05-16)。

我在网上搜索了各种解决方案,甚至采取了完全删除 Julia 并重新安装的方法,但毫无进展。 Conda 在 Julia 内部构建得非常好。

我正在调用以下代码:

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

我已尝试通过 ENV["PYTHON"]="conda activate py37 & python" 将 python 环境设置为本地 Conda 环境,该环境在命令 window 中运行以加载正确的 python 环境(注意:我不介意我是使用这个外部创建的环境,还是 PyCall 旨在通过标准构建创建的默认环境)。我还在管理员模式下尝试了 运行 Julia。每次我不断收到相同的响应(尽管当我尝试指定外部 Conda 环境时有额外的路径相关内容):

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\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

有什么想法吗?

在尝试了很多东西后,我终于找到了解决方案:

解决防火墙和anti-virus冲突

添加相关异常后 PyCall 构建良好。