問題描述
我正在使用 python Anaconda.我很困惑哪個是將所有 Anaconda 軟件包更新到最新版本的正確命令.好像有2個命令可以使用;
I am using python Anaconda. I am confused which is the correct command to update all the Anaconda packages to the latest version. There seems to be 2 commands that can be used;
$ conda update --all
或
$ conda update anaconda
運行后者后,anaconda 升級到了ver4.4.隨后,我運行前者,詢問我是否要降級一些軟件包.這讓我感到困惑.使用哪個命令正確?
After running the latter, anaconda was upgraded to ver4.4. Subsequently, I run the former which asked if I wanted to downgrade some packages. This is what confused me. Which is the correct command to use?
推薦答案
anaconda
包是一個元"包,這意味著它本身不包含任何包,它只是設置Anaconda Inc.(以前稱為 Continuum IO)包含在Anaconda 發行版"中的許多軟件包的特定版本.因此,當您鍵入
The anaconda
package is a "meta"-package, which means that it doesn't contain any packages itself, it merely sets the specific version of a number of packages that Anaconda Inc. (formerly Continuum IO) include with the "Anaconda distribution". Therefore, when you type
conda update anaconda
您告訴 conda 更新到最新版本的 anaconda
包,并安裝所有依賴項及其在 anaconda
包中指定的特定版本.這樣做的好處是 Anaconda Inc.(前身為 Continuum IO)已經一起測試了這些軟件包,并確保不會發生任何沖突.
you are telling conda to update to the most recent version of the anaconda
package, and install all the dependencies with their specific versions as specified in the anaconda
package. This has the advantage that Anaconda Inc. (formerly Continuum IO) have tested the packages together and are making some assurance that there won't be any conflicts.
當你輸入時
conda update --all
conda 使用其內部算法來嘗試解決依賴項的版本.我不確定細節,但這可能會導致一些包被升級,但其他包被降級,因為您安裝的某些包需要降級版本的依賴項.尤其是 anaconda
元包安裝的包的數量,肯定會發生沖突,conda 正在盡最大努力解決所有這些問題.
conda uses its internal algorithm to try and resolve the versions of the dependencies. I'm not sure of the details, but this may result in some packages being upgraded, but others being downgraded because some package that you have installed requires a downgraded version of the dependency. Particularly with the number of packages installed by the anaconda
meta-package, conflicts are sure to happen, and conda is doing its best to resolve all those.
至于使用哪個,我想說如果你從anaconda
開始,繼續使用anaconda
以避免版本沖突(即conda update蟒蛇
).但是,如果您有一個全新的環境,或者您使用的 Miniconda 沒有安裝 anaconda
元包,那么 conda update --all
可能是更好的選擇.您的里程可能會有所不同.
As for which to use, I'd say that if you started with anaconda
, keep going with anaconda
to avoid version conflicts (i.e., conda update anaconda
). However, if you have a fresh environment or you're using Miniconda where you don't have the anaconda
meta-package installed, then conda update --all
is probably the better choice. Your mileage may vary.
這篇關于哪個是更新所有 anaconda python 包的正確命令?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!