使用Windows 10,Julia 1.1.1(2019-05-16)。
我在网上搜索了各种解决方案,甚至不得不完全删除Julia并重新安装它,但没有取得任何进展。康达在Julia的内部完美构建。
我正在调用以下代码:
julia> import Pkg
julia> ENV["PYTHON"]=""
julia> Pkg.build("PyCall")
我尝试通过ENV["PYTHON"]="conda activate py37 & python"
将python环境设置为本地Conda环境,该环境在命令窗口中加载正确激活的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
有什么想法吗?
答案 0 :(得分:0)
尝试了一堆东西之后,我终于找到了解决方案:
解决防火墙和防病毒冲突
添加相关异常后,PyCall可以正常构建。