簡體   English   中英

Visual Studio代碼Django Python調試器指向較舊的virtualenv

[英]Visual Studio code Django Python debugger points to an older virtualenv

我的.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項目的提示將很有幫助!

當您第一次為工作區選擇環境時,它會被寫入您的.vscode/settings.json配置文件。 聽起來您只需要通過選擇新環境來更新該設置即可。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM