美文网首页pycharm使用教程
pycharm中的PythonConsole无法正常使用

pycharm中的PythonConsole无法正常使用

作者: Allard_c205 | 来源:发表于2021-07-23 15:04 被阅读0次

    问题:  选定代码中的一段,想在console中执行,但提示错误说:........路径不是工作目录

    修改方案: 点击file→setting→build,execution,deployment→Console→Python Console→Working directory,

    然后在working directory 输入框中输入python的安装路径,也就是Python interpreter所在的路径。

    点击apply,点击OK,完工。

    总结:console的工作路径指的是python要工作的路径,当然是其所在的工作路径,并不是你运行的文件的路径。我出错的原因,就是填写了我要运行的一个.py文件所在的绝对路径(完整路径)。

    相关文章

      网友评论

        本文标题:pycharm中的PythonConsole无法正常使用

        本文链接:https://www.haomeiwen.com/subject/nbfpmltx.html