如何在pycharmide中传递python的“v”参数

2024-05-23 14:00:00 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在pycharmide中以详细模式运行python程序。我在“运行/调试配置”窗口下的解释器选项中指定了“-v”。但它显示了以下错误:

/usr/bin/python2.7 /home/user1/Downloads/pycharm-community-2016.1.4/helpers/pydev/pydev_run_in_console.py 35261 34268 -v /home/user1/my_codings/gitStuffs/Cura_Debian_Release/usr/share/cura/cura.py Traceback (most recent call last): File "/home/user1/Downloads/pycharm-community-2016.1.4/helpers/pydev/pydev_run_in_console.py", line 71, in globals = run_file(file, None, None) File "/home/user1/Downloads/pycharm-community-2016.1.4/helpers/pydev/pydev_run_in_console.py", line 31, in run_file pydev_imports.execfile(file, globals, locals) # execute the script IOError: [Errno 2] No such file or directory: '-v' Running -v


Tags: runinpycommunityhomeusrdownloadshelpers
1条回答
网友
1楼 · 发布于 2024-05-23 14:00:00

如果您这样运行它应该可以工作:

/usr/bin/python2.7 -v /home/user1/my_codings/gitStuffs/Cura_Debian_Release/usr/share/cura/cura.py

如果您需要调试器(或添加其他文件),则-v应该首先:

^{pr2}$

在PyCharm中,应该在Interpreter options内添加-v /home/user1/Downloads/pycharm-community-2016.1.4/helpers/pydev/pydev_run_in_console.py 35261 34268。在

相关问题 更多 >