Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PowerShell & Python
#1
Hi all,
I’m trying to run simple python scripts with PowerShell. I can run my scripts in .cmd without a hitch. The path looks proper. I opened PowerShell in admin mode as well and it’s still not working.
Researching the web, it seems that MicroSoft disables the functionality of running python with PowerShell?
I’m on PS 7.2 and python 3.11

Thanks,
"Human history becomes more and more a race between education and catastrophe." - H. G. Wells (1866-1946)
Reply
#2
I solved it. You need to type "python filename.py" and then enter. Thanks.
"Human history becomes more and more a race between education and catastrophe." - H. G. Wells (1866-1946)
Reply
#3
Just curious - how do you run "scripts in .cmd without a hitch" if you just discovered that you "need to type "python filename.py" and then enter"?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  using PowerShell from Python script for mounting shares tester_V 8 550 Mar-12-2024, 06:26 PM
Last Post: tester_V
  How to write a part of powershell command as a variable? ilknurg 2 1,132 Jul-26-2022, 11:31 AM
Last Post: ilknurg
Photo Windows 10 PowerShell doesn't work Amy 3 3,930 Apr-27-2021, 01:33 PM
Last Post: jefsummers
  Powershell Session translation to Python; Session code seems to not work Maverick494 1 3,622 Jun-26-2018, 05:16 PM
Last Post: Maverick494
  how to run a file in powershell with python RomanEmpire 6 31,611 Jun-27-2017, 03:23 PM
Last Post: sparkz_alot
  virtualenv on powershell mcmxl22 3 6,408 Feb-08-2017, 06:29 AM
Last Post: snippsat
  Cant Get Powershell to run a python program from notepad++. Newbie help! Pythonerous 4 8,945 Oct-10-2016, 07:16 PM
Last Post: Pythonerous

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020