I try to execute a python script in Powershell, I get this error. The script itself is correct, I can execute the same command in CMD.
So what should I write in powershell?
"C:\Program Files\Python36\python.exe" .\setup.py install
At line:1 char:40
+ "C:\Program Files\Python36\python.exe" .\setup.py install
+ ~~~~~~~~~~
Unexpected token '.\setup.py' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
You need to put an ampersand in front of your application name (here its python.exe)
& "C:\Program Files\Python36\python.exe" .\setup.py install
PowerShell needs the ampersand to interpret the string as a filename.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With