Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm "Can't Open Local Terminal" "Failed to start cmd.exe"?

I'm no noobie to PyCharm. But I can't get the Windows 10 cmd.exe to launch from the "Terminal:" tab. I've located & tried both cmd.exe on my Win10 x64 machine:

enter image description here

...but keep getting the same message (see title of this post).

I also have tried running as Administrator w/ the same problem result.

I've also reviewed these posts but still the same problem:

Can't start a python console in pycharm

Can't open local terminal

I'm running Win10 64bit. PyCharm 2018.3 Community Edition, PyCharm 2018.3 (Community Edition) Build #PC-183.4284.139, built on November 20, 2018 JRE: 1.8.0_152-release-1343-b15 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0

like image 627
JDOaktown Avatar asked Nov 26 '18 18:11

JDOaktown


2 Answers

I faced the same error after a reinstallation of Pycharm. I tried to open an existing project on which file's tree changed. I fixed it by choosing a correct project source directory. ctr + Alt + S -> Project:your_project_name -> Project structure, and choose your source directory location. enter image description here

In settings click on Tools -> terminal and choose your project root. The shell path is by default provided by the IDE after installation.

enter image description here

like image 97
Rukamakama Avatar answered Sep 24 '22 18:09

Rukamakama


Go to File > Settings > Terminal and change shell path from powershell.exe to C:\Windows\System32\cmd.exe.

This fixed the issue.

like image 32
Jim Schwartz Avatar answered Sep 21 '22 18:09

Jim Schwartz