Strange Powershell related error

I am getting the following error when I start Atom with Juno installed:

We tried to start Julia with the  `powershell`  wrapper but could not find  `powershell`  or  `where`  on your 
 `PATH` . Please make sure  `%SYSTEMROOT%\System32\WindowsPowerShell\v1.0`  and  
`%SYSTEMROOT%\System32`  are on your  `PATH`  and restart Juno.

Both are in my PATH. The Julia REPL works without problems. How can I fix this?

julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, broadwell)

(v1.1) pkg> status
    Status `C:\Users\Ilja\.julia\environments\v1.1\Project.toml`
  [c52e3926] Atom v0.8.4
  [6e4b80f9] BenchmarkTools v0.4.2
  [336ed68f] CSV v0.4.3
  [5d742f6a] CSVFiles v0.15.0
  [1375f997] CompEcon v0.4.0
  [8f4d0f93] Conda v1.2.0
  [a93c6f00] DataFrames v0.17.1
  [31a5f54b] Debugger v0.4.0
  [31c24e10] Distributions v0.17.0
  [d872a56f] ElectronDisplay v0.7.0
  [2fe49d83] Expectations v1.1.0
  [442a2c76] FastGaussQuadrature v0.3.3
  [f6369f11] ForwardDiff v0.10.3
  [38e38edf] GLM v1.1.1
  [c91e804a] Gadfly v1.0.1
  [7073ff75] IJulia v1.18.0
  [a98d9a8b] Interpolations v0.11.2
  [682c06a0] JSON v0.20.0
  [e5e0dc1b] Juno v0.7.0
  [b964fa9f] LaTeXStrings v1.0.3
  [ee78f7c6] Makie v0.9.3
  [2774e3e8] NLsolve v4.0.0
  [5fb14364] OhMyREPL v0.5.1
  [429524aa] Optim v0.18.1
  [9b87118b] PackageCompiler v0.6.3
  [d96e819e] Parameters v0.10.3
  [58dd65bb] Plotly v0.2.0
  [91a5bcdd] Plots v0.24.0
  [438e738f] PyCall v1.91.1
  [d330b81b] PyPlot v2.8.1
  [1fd47b50] QuadGK v2.0.3
  [fcd29c91] QuantEcon v0.15.0
  [295af30f] Revise v2.1.2
  [f2b01f46] Roots v0.8.0
  [90137ffa] StaticArrays v0.10.3
  [f3b207a7] StatsPlots v0.10.2
  [40c74d1a] TableView v0.2.0
  [37b6cedf] Traceur v0.3.0
  [37e2e46d] LinearAlgebra
  [9a3f8284] Random
  [10745b16] Statistics
  [8dfed614] Test

Does where powershell work in a cmd prompt?

Nope, do you know why this can be the case and how I can fix this?

C:\Users\Username>where powershell
INFORMATION: Es konnten keine Dateien mit dem angegebenen
Muster gefunden werden.

So if you’re certain that C:\Windows\System32\WindowsPowerShell\v1.0 is on your PATH – is there a powershell.exe in there?

grafik

And yes, there is a powershell.exe there

grafik

That path needs to be in a env variable called Path (or PATH or whatever, it seems to be case insensitive), not in one named Powershell1 or anything else.

It is also there:

grafik

If this information is any useful, Julia starts and works normally inside VSCode.

Not really :slight_smile:

Juno should work fine if you disable the powershell wrapper, I think, but it’d still be interesting to figure out why where powershell doesn’t work for you. Do any of the following work?

C:\Users\you>where powershell
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

C:\Users\you>where where
C:\Windows\System32\where.exe

C:\Users\you>where cmd
C:\Windows\System32\cmd.exe

Only where powershell does not work, the other two work as in your example.

And can you execute C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe?

Yes:

C:\Users\Username>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Windows PowerShell
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

PS C:\Users\Username>

I was able to get it working again by moving powershell.exe directly to C:\Windows\System32\

Why is where being used to detect powershell location? It should always point to %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe

Nevermind, for some reason “where powershell” works now as expected and Julia starts normally after updating Atom to 1.36 (probably unrelatedly).