Python3 Print Statement not showing any output on the Command Line

ε祈祈猫儿з 提交于 2021-02-08 09:47:22

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!