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

20,423

Solution 1

As of today I am running:

PyCharm 2019.1.2 (Community Edition)
Build #PC-191.7141.48, built on May 7, 2019
JRE: 11.0.2+9-b159.56 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

and I can launch cmd.exe from the "terminal" button.

Solution 2

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

Solution 3

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

This fixed the issue.

Solution 4

This is a known regression (IDEA-202881) introduced in IntelliJ/WebStorm/PyCharm etc. version 2018.3. It appears to be related to software restriction policies, preventing to run an internal executable that is used to launch the terminal (instead of launching it directly).

It will be fixed in version 2018.3.3 - the RC already has the fix, check the Early Access Program (links for PyCharm and IDEA)

Share:
20,423
JDOaktown
Author by

JDOaktown

GIS/Android/Bitcoin/Crypto dev'r

Updated on October 30, 2021

Comments

  • JDOaktown
    JDOaktown over 2 years

    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