Pycharm 2019不显示print()输出;尚未退出代码0。如何解决?

问题描述 投票:0回答:1

helloWorld.py

print('hello world')
print("i love all you people")

我的跑步导致PyCharm:

C:\Python37\python3.exe C:/Users/kolose49/PycharmProjects/myFirstProgram/helloWorld.py

Process finished with exit code 0

我在IDLE中的结果(Python 3.7.2 Shell)

Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> 
== RESTART: C:\Users\kolose49\PycharmProjects\myFirstProgram\helloWorld.py ==
hello world
i love all you people
>>> 

项目翻译

Settings>Project: myFirstProgram>Project Interpreter>Python 3.7 C:\Python37\python3.exe

结构:

在文件夹myFirstProgram中>

  • venv
    • 包含
      • 站点包
  • 脚本
    • 激活
    • activate.bat
    • Activate.ps1
    • deactivte.bat
    • python.exe
    • pythonw.exe
  • pyvenv.cfg
  • helloWorld.py
  • 注意:即使只有一行print(),也不会显示任何输出。

    helloWorld.py print('hello world')print(“我爱你们所有人”)My Run在PyCharm中的结果为:C:\ Python37 \ python3.exe C:/Users/kolose49/PycharmProjects/myFirstProgram/helloWorld.py处理...

    python pycharm windows-10
    1个回答
    1
    投票

    想通了。以防万一有人遇到同样的问题。

    © www.soinside.com 2019 - 2024. All rights reserved.