![](/img/trans.png)
[英]Conda.exe failed to run, access is denied C:\Code\JiraData\ExecuteJiraExtract.ps1:31 char:1
[英]Visual Studio Code keeps trying to use conda.exe while it has been uninstalled
我已經卸載了 conda(Miniconda3) 和 VSCode,之后我手動安裝了 python 並重新安裝了 VSCode。 但是,每當我啟動編輯器或運行調試器時,VSCode 一直嘗試使用 conda.exe。
& : The term 'C:\ProgramData\Miniconda3\Scripts\conda.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.
At C:\Users\Victor\Documents\WindowsPowerShell\profile.ps1:4 char:4
+ (& "C:\ProgramData\Miniconda3\Scripts\conda.exe" "shell.powershell" " ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\ProgramData\...ripts\conda.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
這是我不斷收到的錯誤。 我檢查了我的全局設置。json 和本地設置。json 無濟於事。 (編輯:conda.exe 不在我的用戶路徑或系統路徑中。)
解釋器當我手動激活我為 Django 創建的新環境時,它可以工作。
親切的問候,維克多
它還在您的 Windows 環境變量中嗎?
您可以通過以下方式檢查:系統信息 > 高級 > 環境變量
接下來,檢查用戶和系統是否存在。 檢查系統框中的變量路徑或路徑,單擊編輯,看看它是否在那里。 如果是這樣,請從那里刪除 Conda.exe。
我找到了解決方案:在我的文檔文件夾中有一個名為“WindowsPowerShell”的文件夾,其中包含以下代碼:
#region conda initialize
# !! Contents within this block are managed by 'conda init' !!
(& "C:\ProgramData\Miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression
#endregion
刪除包含文件的此文件夾解決了該問題。 我不知道這是怎么到那里的。 康達一定以某種方式做到了這一點。
C:\Users\<username>\Documents\WindowsPowerShell
profile.ps1
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.