python - 如何在 PyCharm 中创建运行当前文件的运行配置?

标签 python pycharm

现在,每次我启动一个新的 Python 文件时,我都必须在 PyCharm 中进行新的运行配置才能运行它。有没有一种方法可以让默认配置只运行您正在查看的任何文件?还是我只需要为每个文件创建一个新配置?

最佳答案

只需在打开模块的编辑器中右键单击或按 Ctrl + Shift +F10,请参阅 Run without any previous configuring .

IDE 将使用 File 中设置的项目为您创建一个临时运行配置。 > Settings > Project > Python Interpreter , 请参阅 Changing the Python interpreter in the project settings .

image of settings

关于python - 如何在 PyCharm 中创建运行当前文件的运行配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66193226/

相关文章:

python - PyCharm 不建议自动完成并标记未解析的引用

python - 如何使用 PyCharm 观察变量?

python - 如何从多个矩阵列表中创建矩阵?

python - 错误 xlPrimary 未在 Python win32com 中定义

python - 如何调试远程python脚本?

javascript - PyCharm:在 Django 模板中调试 Javascript

python - 如何在保持初始数据集的同时打乱每个时期的训练数据集?

python - docker-compose 卷未正确安装

python - 使用图像模块(python)将希伯来语文本绘制到图像上

python-3.x - PyCharm 导入错误 : Claims 'matplotlib' is not a package, 但在 IDLE 中成功运行