RemoveError: 'requests' is a dependency of conda and cannot be removed from conda's operating environment
已經安裝有conda環境,在希望創建新的虛擬環境、克隆環境、安裝包等操作時候,出現如標題的報錯。
原因:'requests’包是用pip 安裝的或者採用python setup.py install進行安裝時候所引起,而如果再用canda 安裝其他有關包時便會觸發此錯誤,可以使用conda list 查看安裝包的信息。
在當前虛擬環境下做了下面嘗試,沒有成功
- 刪除site-package的requests相關包
- 卸載site-package中的pip
- conda update conda
大招!! 成功!!重點!!
沒有找到到底依賴哪個包,故未知pip install packages的情況。我是採用如下成功
conda update --force conda
參考:
- http://cncc.bingj.com/cache.aspx?q=conda+update+conda+RemoveError%3A+'requests'+is+a+dependency+of+conda++&d=4806903486219727&mkt=en-US&setlang=en-US&w=o3MpXG5OB9OJ7T5ac7SpdS0ER3A1gv3j
- https://stackoverflow.com/questions/54392995/removeerror-requests-is-a-dependency-of-conda-and-cannot-be-removed-from-cond