3

I am at Chapter One of Zed Shaw's Python the Hard Way book and I'm already stuck. I can run python in a command shell, but when I try to run it in PowerShell, I get this:

python : Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
At line:1 char:1
+ python
+ ~~~~~~
    + CategoryInfo          : NotSpecified: (Python 3.7.3 (v...ntel)] on win32:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Any guidance appreciated. I'm going to move on using the command shell for now but would love to figure out PowerShell

1
  • Is python on your PATH in your system environment variables? And you are just trying to enter python as a command into powershell and nothing else? Commented Apr 9, 2019 at 23:43

2 Answers 2

4

You have to run Windows PowerShell, and not Windows PowerShell ISE.

The ISE is a script editor for PowerShell, and doesn't run python. Windows PowerShell (not ISE) does allow you to run python.

Sign up to request clarification or add additional context in comments.

3 Comments

Great sleuthing; alternatively, run from a PowerShell Core console window.
Interesting that the ISE won't run it while the console will. I wonder if launching the ISE with the -MTA parameter will allow it to run Python.
@TheMadTechnician: That doesn't seem to make a difference; in fact, if you try to run cmd.exe, you'll get Cannot start "cmd". Interactive console applications are not supported. Trying to run python should yield the same error, but doesn't.
1

Interactive console applications are not supported in ISE, use PowerShell instead.

Console Application (Non) Support in the ISE

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.