build PyCall出错

之前将包剪切到另一个地址(已修改JULIA_DEPOT_PATH环境变量)后,无法using PyCall,显示需要重新build,于是重新build,报错如下,请问是哪里出了问题?

(v1.1) pkg> build PyCall
  Building Conda ─→ `D:\Users\Maxwell\AppData\Local\Julia\depot\packages\Conda\CpuvI\deps\build.log`
  Building PyCall → `D:\Users\Maxwell\AppData\Local\Julia\depot\packages\PyCall\0jMpb\deps\build.log`
┌ Error: Error building `PyCall`:
│ ʹ�á�2���������á�DownloadFile��ʱ�����쳣:�������ѳ�ʱ����
│ ����λ�� ��:1 �ַ�: 96
│ + ... pe]::Tls12; (New-Object System.Net.Webclient).DownloadFile('https://r ...
│ +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
│     + FullyQualifiedErrorId : WebException
│
│ ┌ 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', 'D:\Users\Maxwell\AppData\Local\Julia-1.0.3\depot\conda\3\installer.exe')"`, ProcessExited(1)) [1]
│ 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 D:\Users\Maxwell\AppData\Local\Julia\depot\packages\Conda\CpuvI\src\Conda.jl:160
│  [5] _install_conda(::String) at D:\Users\Maxwell\AppData\Local\Julia\depot\packages\Conda\CpuvI\src\Conda.jl:152
│  [6] runconda(::Cmd, ::String) at D:\Users\Maxwell\AppData\Local\Julia\depot\packages\Conda\CpuvI\src\Conda.jl:111
│  [7] add at D:\Users\Maxwell\AppData\Local\Julia\depot\packages\Conda\CpuvI\src\Conda.jl:183 [inlined] (repeats 2 times)
│  [8] top-level scope at D:\Users\Maxwell\AppData\Local\Julia\depot\packages\PyCall\0jMpb\deps\build.jl:185
│  [9] include at .\boot.jl:326 [inlined]
│  [10] include_relative(::Module, ::String) at .\loading.jl:1038
│  [11] include(::Module, ::String) at .\sysimg.jl:29
│  [12] include(::String) at .\client.jl:403
│  [13] top-level scope at none:0
│ in expression starting at D:\Users\Maxwell\AppData\Local\Julia\depot\packages\PyCall\0jMpb\deps\build.jl:144
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\Pkg\src\Operations.jl:1075

看着像是网络问题,开一下全局代理

1 个赞

还有一个常见错误是 Python 环境的问题。这个时候,可以用下面的命令启动 Julia:

PYTHON="" julia

这个问题怎么解决的呢?我也遇到这个问题,一直解决不了呢:sob:

好像一般是因为VPN或环境变量问题 后来没怎么用Julia 当时怎么弄的 我忘了 看样子 是开了VPN

多build几次可能能解决,因为网络的问题。我是没有挂梯子,就是重复build很多次就解决了。

解决方法

请问解决了么,我也有这个问题