Sep-06-2017, 09:47 PM
Presuming you have installed Python correctly, you should know that Python uses the command terminal by default, not PowerShell. If you file is something like:
As to the problem you refer to, sounds as if the Environmental Variables may not be set. You can verify this by typing in a command terminal (not PowerShell)
Also, please do not post screen images, rather copy and paste any code, output and errors between their respective tags. Refer to our Help / Rules document on BBCode for instructions.
print("hello world")When you type "hello.py" in PowerShell, Python will open a command terminal window, print "hello world" then close the window. This happens faster than the human eye can register, so you should run it from a command terminal rather than PowerShell.
As to the problem you refer to, sounds as if the Environmental Variables may not be set. You can verify this by typing in a command terminal (not PowerShell)
C:\> PATH
, you should see the following entries:Output:C:\>PATH
PATH=C:\Python36\Scripts\;C:\Python36\;
If they do not exist, you have to add them. If they do exist, try typing "python" (in either command terminal or PowerShell), you should see similar:Output:C:\>python
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
If you still have a problem, please post the directory where you installed Python. Verify that the location were you saved your file is indeed where it is installed.Also, please do not post screen images, rather copy and paste any code, output and errors between their respective tags. Refer to our Help / Rules document on BBCode for instructions.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition