暂无分类
暂无标签
发布于2020-02-27 10:34 阅读(737) 评论(0) 点赞(10) 收藏(4)
0
1
2
3
4
安装好anaconda后,在pycharm中无论运行什么样的python脚本,都会默认使用ipython的console运行,界面会出现好几行无关紧要的内容。
比如打印一句:hello world
出现以下一大串内容:
C:\Users\Administrator\Anaconda3\python.exe “C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.4\helpers\pydev\pydev_run_in_console.py” 64190 64191 “C:/Users/Administrator/PycharmProjects/untitled1/hello world.py”
Running C:/Users/Administrator/PycharmProjects/untitled1/hello world.py
hello world
import sys; print(‘Python %s on %s’ % (sys.version, sys.platform))
sys.path.extend([‘C:\Users\Administrator\PycharmProjects\untitled1’, ‘C:/Users/Administrator/PycharmProjects/untitled1’])
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]
Type ‘copyright’, ‘credits’ or ‘license’ for more information
IPython 6.4.0 – An enhanced Interactive Python. Type ‘?’ for help.
PyDev console: using IPython 6.4.0
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
怎么去掉呢?
点击右上角文件名旁边的向下下拉箭头,选择第一个“Edit Configurations”。
把“run with Python console”勾去掉,有些pycharm版本显示的不是“run with Python console”而是“Show command line afterwards”,不管是哪个,位置不变,都是它,把勾去掉就行。
如果希望所有的python文件都不显示,那就是选择旁边的Defaults,把“run with Python console”勾去掉。
再次运行hello world.py,那几行无关紧要的话就没了。
新建一个Python文件,也不会出现,而是出现这样一句话:Process finished with exit code 0。
0
1
2
3
4
5
6
7
8
9
作者:天青色等烟雨
链接: https://www.pythonheidong.com/blog/article/234967/e6ae16513d4f9ae358ed/
来源: python黑洞网
任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任
昵称:
评论内容:(最多支持255个字符)
Copyright © 2018-2021 python黑洞网 All Rights Reserved 版权所有,并保留所有权利。 京ICP备18063182号-1
投诉与举报,广告合作请联系z452as@163.com或QQ3083709327
免责声明:网站文章均由用户上传,仅供读者学习交流使用,禁止用做商业用途。若文章涉及色情,反动,侵权等违法信息,请向我们举报,一经核实我们会立即删除!