Win 10 Issue with Pkg/PlatformEngines

I have been trying to find a fix for this issue for awhile. Perhaps this is a bug or my Windows has an issue. I have Powershell/curl on path along with 7z and tar. Am on Win 10 machine. I am able to run powershell and 7z from cmd using powershell and 7z . Furthermore, I can run powershell and 7z inside Julia using run( powershell ) and run( 7z ).

(@v1.4) pkg> add Example
   Updating registry at `C:\Users\Zac\.juliapro\JuliaPro_v1.4.2-1\registries\JuliaPro`
ERROR: No download engines found. We looked for: powershell, C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe, curl, wget, fetch, busybox. Install one and ensure it  is available on the path.
No compression engines found. We looked for: C:\Users\Zac\AppData\Local\JuliaPro-1.4.2-1\Julia-1.4.2\bin\..\libexec\7z.exe, C:\Users\Zac\AppData\Local\JuliaPro-1.4.2-1\Julia-1.4.2\bin\7z.exe, 7z, tar, busybox. Install one and ensure it is available on the path.   

Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] probe_platform_engines!(; verbose::Bool) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\PlatformEngines.jl:512
 [3] probe_platform_engines! at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\PlatformEngines.jl:176 [inlined]
 [4] pkg_server_registry_url(::Base.UUID) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\Types.jl:873
 [5] update_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}; force::Bool) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\Types.jl:1044
 [6] update_registries at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\Types.jl:1036 [inlined] (repeats 2 times)
 [7] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\API.jl:143
 [8] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\API.jl:112
 [9] #add#27 at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\API.jl:109 [inlined]
 [10] add(::Array{Pkg.Types.PackageSpec,1}) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\API.jl:109
 [11] do_cmd!(::Pkg.REPLMode.Command, ::REPL.LineEditREPL) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\REPLMode\REPLMode.jl:403
 [12] do_cmd(::REPL.LineEditREPL, ::String; do_rethrow::Bool) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\REPLMode\REPLMode.jl:381
 [13] do_cmd at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\REPLMode\REPLMode.jl:376 [inlined]
 [14] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\REPLMode\REPLMode.jl:542
 [15] (::Atom.var"#4#15"{Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL,REPL.LineEdit.Prompt}})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at C:\Users\Zac\.juliapro\JuliaPro_v1.4.2-1\packages\Atom\9h5Up\src\Atom.jl:31
 [16] #invokelatest#1 at .\essentials.jl:712 [inlined]
 [17] invokelatest at .\essentials.jl:711 [inlined]
 [18] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\REPL\src\LineEdit.jl:2354
 [19] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\REPL\src\REPL.jl:1055
 [20] run_repl(::REPL.AbstractREPL, ::Any) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\REPL\src\REPL.jl:206
 [21] (::Base.var"#764#766"{Bool,Bool,Bool,Bool})(::Module) at .\client.jl:383
 [22] #invokelatest#1 at .\essentials.jl:712 [inlined]
 [23] invokelatest at .\essentials.jl:711 [inlined]
 [24] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at .\client.jl:367
 [25] exec_options(::Base.JLOptions) at .\client.jl:305
 [26] _start() at .\client.jl:484

If we look at probe_platform_engines we get the following info:

julia> Pkg.PlatformEngines.probe_platform_engines!(; verbose=true)
[ Info: Probing for download engine...
[ Info: Probing powershell as a possibility...
[ Info: Probing C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe as a possibility...
[ Info: Probing curl as a possibility...
[ Info: Probing wget as a possibility...
[ Info: Probing fetch as a possibility...
[ Info: Probing busybox as a possibility...
[ Info: Probing for compression engine...
[ Info: Probing C:\Users\Zac\AppData\Local\JuliaPro-1.4.2-1\Julia-1.4.2\bin\..\libexec\7z.exe as a possibility...
[ Info: Probing C:\Users\Zac\AppData\Local\JuliaPro-1.4.2-1\Julia-1.4.2\bin\7z.exe as a possibility...
[ Info: Probing 7z as a possibility...
[ Info: Probing tar as a possibility...
[ Info: Probing busybox as a possibility...
ERROR: No download engines found. We looked for: powershell, C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe, curl, wget, fetch, busybox. Install one and ensure it  is available on the path.
No compression engines found. We looked for: C:\Users\Zac\AppData\Local\JuliaPro-1.4.2-1\Julia-1.4.2\bin\..\libexec\7z.exe, C:\Users\Zac\AppData\Local\JuliaPro-1.4.2-1\Julia-1.4.2\bin\7z.exe, 7z, tar, busybox. Install one and ensure it is available on the path.   

Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] probe_platform_engines!(; verbose::Bool) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\PlatformEngines.jl:512
 [3] top-level scope at none:0

Lets focus on the first problem first, the download engine.

In the Julia REPL what is your output of:

julia> ENV["PATH"]

You may try to set the download engine explicit with e.g.:

julia> ENV["BINARYPROVIDER_DOWNLOAD_ENGINE"]="c:\\Windows\\System32\\curl.exe"
"c:\\Windows\\System32\\curl.exe"

Bit of a mess but here it is

julia> ENV["PATH"]
"C:\\gurobi901\\win64\\bin;C:\\Program Files (x86)\\Razer\\ChromaBroadcast\\bin;C:\\Program Files\\Razer\\ChromaBroadcast\\bin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\intel64\\compiler;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\MATLAB\\R2016b\\runtime\\win64;C:\\Program Files\\MATLAB\\R2016b\\bin;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\SlikSvn\\bin;C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Git\\cmd;C:\\Users\\Zac\\AppData\\Local\\Programs\\Julia\\Julia-1.4.2\\bin\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Users\\Zac\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Julia 
1.4.2\\;C:\\Windows\\System32\\;C:\\Users\\Zac\\AppData\\Local\\Programs\\Julia\\Julia-1.4.2\\libexec\\;C:\\Program Files\\PowerShell\\7\\;C:\\Users\\Zac\\AppData\\Local\\JuliaPro-1.4.2-1\\Julia-1.4.2\\bin;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe;C:\\Users\\Zac\\AppData\\Local\\JuliaPro-1.4.2-1\\Julia-1.4.2\\bin\\7z.exe;%SYSYTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32;C:\\WINDOWS;C:\\Users\\Zac\\Anaconda3;C:\\Users\\Zac\\Anaconda3\\Library\\mingw-w64\\bin;C:\\Users\\Zac\\Anaconda3\\Library\\usr\\bin;C:\\Users\\Zac\\Anaconda3\\Library\\bin;C:\\Users\\Zac\\Anaconda3\\Scripts;C:\\Users\\Zac\\Anaconda3\\bin;C:\\Users\\Zac\\Anaconda3\\condabin;C:\\Program Files (x86)\\Razer\\ChromaBroadcast\\bin;C:\\Program Files\\Razer\\ChromaBroadcast\\bin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\intel64\\compiler;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Program Files (x86)\\QuickTime\\QTSystem;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\MATLAB\\R2016b\\runtime\\win64;C:\\Program Files\\MATLAB\\R2016b\\bin;C:\\WINDOWS\\System32\\OpenSSH;C:\\Program Files\\SlikSvn\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell;C:\\Users\\Zac\\AppData\\Local\\JuliaPro-1.4.2-1\\Julia-1.4.2\\bin;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Users\\Zac\\AppData\\Local\\Programs\\Julia\\Julia-1.4.2\\libexec\\;C:\\Users\\Zac\\AppData\\Local\\Programs\\Julia\\Julia-1.4.2\\libexec\\7z.exe;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe;C:\\Users\\Zac\\AppData\\Local\\JuliaPro-1.4.2-1\\Julia-1.4.2\\bin\\7z.exe;"

Trying your suggestion gives a similar error to the original:

julia> ENV["BINARYPROVIDER_DOWNLOAD_ENGINE"]="c:\\Windows\\System32\\curl.exe"
"c:\\Windows\\System32\\curl.exe"

(@v1.4) pkg> add Example
   Updating registry at `C:\Users\Zac\.juliapro\JuliaPro_v1.4.2-1\registries\JuliaPro`
┌ Warning: Ignoring BINARYPROVIDER_DOWNLOAD_ENGINE as its value of `c:\Windows\System32\curl.exe` doesn't match any known valid engines. Try one of `powershell, C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe, curl, wget, fetch, busybox`.
└ @ Pkg.PlatformEngines C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\PlatformEngines.jl:424
ERROR: No download engines found. We looked for: powershell, C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe, curl, wget, fetch, busybox. Install one and ensure it  is available on the path.
No compression engines found. We looked for: C:\Users\Zac\AppData\Local\JuliaPro-1.4.2-1\Julia-1.4.2\bin\..\libexec\7z.exe, C:\Users\Zac\AppData\Local\JuliaPro-1.4.2-1\Julia-1.4.2\bin\7z.exe, 7z, tar, busybox. Install one and ensure it is available on the path.   

Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] probe_platform_engines!(; verbose::Bool) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\PlatformEngines.jl:512
 [3] probe_platform_engines! at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\PlatformEngines.jl:176 [inlined]
 [4] pkg_server_registry_url(::Base.UUID) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\Types.jl:873
 [5] update_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}; force::Bool) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\Types.jl:1044
 [6] update_registries at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\Types.jl:1036 [inlined] (repeats 2 times)
 [7] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\API.jl:143
 [8] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\API.jl:112
 [9] #add#27 at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\API.jl:109 [inlined]
 [10] add(::Array{Pkg.Types.PackageSpec,1}) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\API.jl:109
 [11] do_cmd!(::Pkg.REPLMode.Command, ::REPL.LineEditREPL) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\REPLMode\REPLMode.jl:403
 [12] do_cmd(::REPL.LineEditREPL, ::String; do_rethrow::Bool) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\REPLMode\REPLMode.jl:381
 [13] do_cmd at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\REPLMode\REPLMode.jl:376 [inlined]
 [14] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\Pkg\src\REPLMode\REPLMode.jl:542
 [15] (::Atom.var"#4#15"{Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL,REPL.LineEdit.Prompt}})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at C:\Users\Zac\.juliapro\JuliaPro_v1.4.2-1\packages\Atom\9h5Up\src\Atom.jl:31
 [16] #invokelatest#1 at .\essentials.jl:712 [inlined]
 [17] invokelatest at .\essentials.jl:711 [inlined]
 [18] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\REPL\src\LineEdit.jl:2354
 [19] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\REPL\src\REPL.jl:1055
 [20] run_repl(::REPL.AbstractREPL, ::Any) at C:\Users\julia\AppData\Local\Julia-1.4.2\share\julia\stdlib\v1.4\REPL\src\REPL.jl:206
 [21] (::Base.var"#764#766"{Bool,Bool,Bool,Bool})(::Module) at .\client.jl:383
 [22] #invokelatest#1 at .\essentials.jl:712 [inlined]
 [23] invokelatest at .\essentials.jl:711 [inlined]
 [24] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at .\client.jl:367
 [25] exec_options(::Base.JLOptions) at .\client.jl:305
 [26] _start() at .\client.jl:484

EDIT: I made PATH["BINARYPROVIDER_DOWNLOAD_ENGINE"] = "curl" which gets rid of the warning and searches for curl but alas we get the same error.

Your ENV[“PATH”] has some issues.
E.g. there are entries like:
C:\\Users\\Zac\\AppData\\Local\\JuliaPro-1.4.2-1\\Julia-1.4.2\\bin\\7z.exe

If you want 7z.exe to be found automatically, your PATH entry should be:
C:\\Users\\Zac\\AppData\\Local\\JuliaPro-1.4.2-1\\Julia-1.4.2\\bin
without the exe itself (7z.exe).

Have you already tried to adjust your PATH? Do some clean up with this in mind. The same issue is for
C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe
Put
C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0
into your PATH.

So I was actually using both the path and executable entries. I have removed the executable entries. The issue remains however. Very strange since I can run powershell from cmd and even Julia using run.

Sorry, deleted, I am confused, you already did a probe_platform_engines!

Do you get true if

julia> success(Cmd(`powershell`))
true

?

Okay this is abit more interesting:

julia> success(Cmd(`powershell`))
ERROR: IOError: could not spawn `powershell`: no such file or directory (ENOENT)
Stacktrace:
 [1] _spawn_primitive(::String, ::Cmd, ::Array{Any,1}) at .\process.jl:99
 [2] #550 at .\process.jl:112 [inlined]
 [3] setup_stdios(::Base.var"#550#551"{Cmd}, ::Array{Any,1}) at .\process.jl:196
 [4] _spawn at .\process.jl:111 [inlined]
 [5] _spawn at .\process.jl:106 [inlined]
 [6] success(::Cmd) at .\process.jl:496
 [7] top-level scope at none:0

And with complete path?

julia> success(Cmd(`C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`))
true

julia> success(Cmd(`C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell`))
true

If this errors again, I would first try to install powershell again:

You may also try whats described in this link, like finding and version of powershell and see if everything is normal.

Neither of those work either. I have disabled and reinabled powershell through windows (as this seems to be the only way to ‘reinstall it’ since that website is for updating PS on older OS - I think). Still no success. I have also reordered relevant paths from path variable and deleted any duplicates.

:thinking:

Does any windows command work from the Julia REPL? Like

success(Cmd(`C:\\Windows\\System32\\cmd.exe`))

Could you try another command in another path? E.g. copy cmd.exe to c:\temp and do a

success(Cmd(`c:\\temp\\cmd.exe`))

I am running out of ideas.

Neither of those work… :sweat:

It might be worth noting that the run command works fine. Eg. run(`cmd`).

Do you mind to download and install plain Julia from here

If, e.g.
add DataFrames
is working here, than we know it isn’t your Windows which causes problems.

Nope, still the same error. :frowning: Something very wrong with my OS.

Is this somehow some kind of high security environment? Something (or everything) blocked by your IT department? Anything like that? Perhaps I am complete on the wrong track, I don’t know.

It’s a home desktop and I’m at a loss for what it could be at this point. Is the difference between the success and run functions… It’s very strange that one throws and error whilst the other does not.

Could you run Julia with Administrator privileges and try again?

Nope, no luck. Here is issue on GitHub if you see anything that might help
https://github.com/JuliaLang/julia/issues/36722

To dive deeper into your issue, please restart your PC in safe mode WITH Network drivers.

To do this the easiest is method 6. Use “Shift + Restart” on the Windows 10 Start Menu:

Read the complete description of method 6, before you actually do it, because you have to know which path to go.

Once in safe mode WITH Network drivers start a plain REPL (not Atom) and try again to add a package from the repository, e.g.:

]add DataFrames

I have tried the same on my PC and I did an

]up

in safe mode. It happily updated some packages from github.

Lets see if we can narrow it down…

For anyone who comes across this issue, it can be resolved by deleting the .julia files and doing a fresh install of julia. I can’t believe I didn’t try this originally - only just stumbled across the files.

1 Like