I initially would like to use PyPlot. The error message prompted me to rebuild PyCall. V1.4, Windows 7 x64.
I then use this command
using Pkg
Pkg.build(“PyCall”)
But it did not solve the problem. I was unable to build PyCall.
The error message is below:
julia> using PyPlot
[ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
ERROR: LoadError: LoadError: PyCall not properly installed. Please run Pkg.build(“PyCall”)
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] top-level scope at C:\Users\a225.julia\packages\PyCall\zqDXB\src\startup.jl:44
[3] include(::Module, ::String) at .\Base.jl:377
[4] include(::String) at C:\Users\a225.julia\packages\PyCall\zqDXB\src\PyCall.jl:1
[5] top-level scope at C:\Users\a225.julia\packages\PyCall\zqDXB\src\PyCall.jl:34
[6] include(::Module, ::String) at .\Base.jl:377
[7] top-level scope at none:2
[8] eval at .\boot.jl:331 [inlined]
[9] eval(::Expr) at .\client.jl:449
[10] top-level scope at .\none:3
in expression starting at C:\Users\a225.julia\packages\PyCall\zqDXB\src\startup.jl:41
in expression starting at C:\Users\a225.julia\packages\PyCall\zqDXB\src\PyCall.jl:34
ERROR: LoadError: Failed to precompile PyCall [438e738f-606a-5dbb-bf0a-cddfbfd45ab0] to C:\Users\a225.julia\compiled\v1.4\PyCall\GkzkC_whFRm.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1272
[3] _require(::Base.PkgId) at .\loading.jl:1029
[4] require(::Base.PkgId) at .\loading.jl:927
[5] require(::Module, ::Symbol) at .\loading.jl:922
[6] include(::Module, ::String) at .\Base.jl:377
[7] top-level scope at none:2
[8] eval at .\boot.jl:331 [inlined]
[9] eval(::Expr) at .\client.jl:449
[10] top-level scope at .\none:3
in expression starting at C:\Users\a225.julia\packages\PyPlot\XHEG0\src\PyPlot.jl:4
ERROR: Failed to precompile PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee] to C:\Users\a225.julia\compiled\v1.4\PyPlot\oatAj_whFRm.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1272
[3] _require(::Base.PkgId) at .\loading.jl:1029
[4] require(::Base.PkgId) at .\loading.jl:927
[5] require(::Module, ::Symbol) at .\loading.jl:922
Error message after Julia failed to build PyCall
julia> Pkg.build(“PyCall”)
Building Conda ─→ C:\Users\a225\.julia\packages\Conda\3rPhK\deps\build.log
Building PyCall → C:\Users\a225\.julia\packages\PyCall\zqDXB\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\WindowsPowerSh ell\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-latest-Windows-x86_64.exe', 'C:\Users\a225\.julia\conda\3\installer.exe')",
ProcessExited(3221225477)) [3221225477]
│
│ Stacktrace:
│ [1] pipeline_error at .\process.jl:525 [inlined]
│ [2] download_powershell(::String, ::String) at .\download.jl:20
│ [3] download at .\download.jl:64 [inlined]
│ [4] _install_conda(::String, ::Bool) at C:\Users\a225.julia\packages\Conda\3
rPhK\src\Conda.jl:164
│ [5] _install_conda(::String) at C:\Users\a225.julia\packages\Conda\3rPhK\src
\Conda.jl:155
│ [6] runconda(::Cmd, ::String) at C:\Users\a225.julia\packages\Conda\3rPhK\sr
c\Conda.jl:112
│ [7] add(::String, ::String; channel::String) at C:\Users\a225.julia\packages
\Conda\3rPhK\src\Conda.jl:188
│ [8] add at C:\Users\a225.julia\packages\Conda\3rPhK\src\Conda.jl:187 [inline
d] (repeats 2 times)
│ [9] top-level scope at C:\Users\a225.julia\packages\PyCall\zqDXB\deps\build.
jl:84
│ [10] include(::String) at .\client.jl:439
│ [11] top-level scope at none:5
│ in expression starting at C:\Users\a225.julia\packages\PyCall\zqDXB\deps\buil
d.jl:43
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib
\v1.4\Pkg\src\Operations.jl:892
failed. You could try running this in at a Windows console to see if you get a more informative error message, but I’m guessing it’s some kind of firewall thing?
If you want to use a pre-existing/manual Python installation via ENV["PYTHON"], then you need to install a 64-bit Python for a 64-bit Julia, or switch to a 32-bit Julia to link to a 32-bit Python.
If you want Julia to install its own Miniconda distro, you have to resolve the download failure. As I noted above, this is most likely some kind of firewall misconfiguration.