0

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

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

我正在调用以下代码:

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

我尝试将 python 环境设置为本地 Conda 环境,通过ENV["PYTHON"]="conda activate py37 & python"该环境在命令窗口中加载正确的激活的 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\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

有什么想法吗?

4

1 回答 1

0

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

解决防火墙和防病毒冲突

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

于 2019-07-18T18:01:11.077 回答