最近換了新電腦,更新到了Win11系統(tǒng)。
在Win11下使用Anaconda時遇到了’CommandNotFoundError: Your shell has not been properly configured to use 'conda activate’錯誤,錯誤顯示如下:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init
在網(wǎng)上找了一些教程,大多沒啥作用,最后是嘗試了一下下面的方法,最終解決了問題,寫下此文作為記錄,并且希望可以幫助到遇到同樣問題的同學(xué)。
其實這是初次使用Anaconda時,沒有預(yù)先對命令行進(jìn)行預(yù)載的結(jié)果。Anaconda沒有正確識別到命令行。
解決辦法也非常簡單,只需根據(jù)Anaconda的提示運(yùn)行對應(yīng)的命令即可。
Windows下執(zhí)行下列命令:
conda init cmd.exe
總之,對于不同的命令行軟件,只需要運(yùn)行如Anaconda提示中的命令:文章來源:http://www.zghlxwxcb.cn/news/detail-653097.html
conda init {TERMINAL_TYPE}
就能夠解決該報錯問題。文章來源地址http://www.zghlxwxcb.cn/news/detail-653097.html
到了這里,關(guān)于如何解決‘CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate’錯誤的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!