IOError: could not spawn 'cmd' : no such file or directory <ENOENT>

hi
Im kinda new on Julia. While working on REPL, when I want to switch to cmd and type it on Shell I get this error.

IOError: could not spawn ‘cmd’ : no such file or directory

I also added installation directory to environment variables but it didnt help. Is there any way I can solve it?ERROR

This works for me.
What happens, if you run “cmd” in a windows shell (like cmd itself) ?
My guess is, that you somehow messed around with your PATH environment variable.
What gives

echo %PATH%

when run in a cmd shell?

cmd shell returns the paths and works well. I checked environmental variables again for any possible mistakes. the point is that when the path is not correct,Julia is not executed from cmd but when I want to run cmd from Julia Shell, I get mentioned error.

Can you try this?

Or in a Powershell, e.g.:

Windows PowerShell
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Lernen Sie das neue plattformübergreifende PowerShell kennen – https://aka.ms/pscore6

PS C:\Users\oheil> cmd
Microsoft Windows [Version 10.0.19042.804]
(c) 2020 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\oheil>
1 Like

I found the problem. simply but changing to new path, I used to lose the older one. this time I tried giving multiple paths separating them by semicolon and could solve the issue.
I appended these two paths:
Path = %SystemRoot%\system32 # for windows shell
and path = C:… \Local\Programs\Julia 1.5.3\bin # for Julia
to below PATH
Path = %SystemRoot%\system3;C:… \Local\Programs\Julia 1.5.3\bin
and now it works.
thanks for the help

2 Likes