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

mklement0
  • 382,024
  • 64
  • 607
  • 775
Mark Folse
  • 29
  • 3
  • 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? – Reedinationer Apr 09 '19 at 23:43

2 Answers2

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.

HAL9256
  • 12,384
  • 1
  • 34
  • 46
  • Great sleuthing; alternatively, run from a PowerShell _Core_ console window. – mklement0 Apr 10 '19 at 00:01
  • 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 Apr 10 '19 at 00:03
  • @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. – mklement0 Apr 10 '19 at 00:12
1

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

Console Application (Non) Support in the ISE

Kexy Biscuit
  • 390
  • 3
  • 11