【问题标题】:Visual Studio code Django Python debugger points to an older virtualenvVisual Studio 代码 Django Python 调试器指向较旧的 virtualenv
【发布时间】:2018-10-09 20:48:32
【问题描述】:

我的 .virtualenv 文件夹出现了一些问题(有 2 个项目并行工作,一个虚拟环境正在查看另一个),所以我手动删除了它们并重新安装了一个只有 1 个项目的 pipenv/pip .我验证了同一项目的新文件夹已创建。但是,当我尝试使用 Visual Studio Code 调试项目时,它给了我这个错误:

& : The term 'C:\Users\userId\.virtualenvs\project-1abcde2S\Scripts\python.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.

project-1abcde2S 指向我删除的文件夹。有没有办法确保在 Visual Studio 代码中获得新的虚拟环境?调试 Django 项目的任何其他技巧都会有所帮助!

【问题讨论】:

    标签: python django debugging visual-studio-code


    【解决方案1】:

    当您第一次为工作区选择环境时,它会写入您的.vscode/settings.json 配置文件。听起来您只需要通过 selecting your new environment 更新该设置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-04
      • 1970-01-01
      • 2014-09-16
      • 1970-01-01
      • 1970-01-01
      • 2019-08-20
      相关资源
      最近更新 更多