问题
I am running a simple python print statement but when I execute the file no output appears, no errors appear either. I have installed python 3.8 today. I added python38 to my PATH in my environment variables in windows. I also double checked that I am runnning the .py file from the correct DIR.
Python Code (variables.py)
print("hello")
Run in CLI
python3 variables.py
No output appears, cli just goes to next line.
Any ideas why no output?
Thank you.
Adding requested output of commands
which python
/c/Users/first.last/AppData/Local/Programs/Python/Python38/python
python --version
Python 3.8.0
No output seen with this
python -c 'print("Hello")'
Where python output
where python
C:\Users\first.last\AppData\Local\Programs\Python\Python38\python.exe
C:\Users\first.last\AppData\Local\Microsoft\WindowsApps\python.exe
来源:https://stackoverflow.com/questions/59364487/python3-print-statement-not-showing-any-output-on-the-command-line