【问题标题】:Code Runner extension in VSCode in Ubuntu 20.04 platform is not working with python fileUbuntu 20.04 平台中 VSCode 中的 Code Runner 扩展不适用于 python 文件
【发布时间】:2023-03-22 00:46:01
【问题描述】:

每当我尝试在 Ubuntu 20.04 的 VSCode 中使用 Code Runner 扩展程序运行代码 print(“Hello World”) 时,它都会显示输出

Command ‘python not found’

但是如果我在 VSCode 中右键单击并选择“在终端中运行 python 文件”,它可以顺利运行,但不能通过 Code Runner 扩展。

【问题讨论】:

  • 请不要发图片,你的输出是文本,你可以复制粘贴。您是否查看过有关此主题的其他类似问题?尝试设置code-runner.executorMapstackoverflow.com/questions/61497103/…
  • @soulshined 非常感谢。

标签: ubuntu visual-studio-code vscode-code-runner


【解决方案1】:

进入设置类型code runner executor map点击json中的编辑。寻找蟒蛇。将python -u 替换为python3 -u

【讨论】:

  • 通过替换相同的程序在运行但它没有从键盘输入()方法输入
猜你喜欢
  • 1970-01-01
  • 2022-01-19
  • 2022-10-24
  • 2018-11-30
  • 1970-01-01
  • 2022-10-04
  • 1970-01-01
  • 1970-01-01
  • 2021-10-10
相关资源
最近更新 更多