为什么`conda update --all`不全部更新? [英] Why does `conda update --all` not update all?
问题描述
类似于此问题,但是那里没有答案.
Similar to this question, but there's no answer there.
我先安装了anaconda
,然后又安装了conda install -c conda-forge geopandas
.当我运行import geopandas
时,我得到了
I installed anaconda
, and then conda install -c conda-forge geopandas
. When I ran import geopandas
, I got
>>> import geopandas as gpd
anaconda3/envs/gis/lib/python3.7/importlib/_bootstrap.py:219:
RuntimeWarning: numpy.dtype size changed, may indicate binary
incompatibility. Expected 96, got 88
return f(*args, **kwds)
因此,我尝试更新像conda update --all
这样的Anaconda env的所有软件包,但这并不能解决警告.解决方案 的解决方案是更新特定程序包:conda update numpy
.
So, I tried updating all packages of my Anaconda env like conda update --all
, but that didn't solve the warnings. What did solve it was updating the specific package: conda update numpy
.
所以,我的问题是:conda update --all
是做什么的,它不会更新所有软件包?
So, my question is: what does conda update --all
do, that it doesn't update all packages?
推荐答案
conda update
文档指出:
此命令接受软件包名称列表,并将其更新为与环境中所有其他软件包兼容的最新版本 ." -强调我的
"This command accepts a list of package names and updates them to the latest versions that are compatible with all other packages in the environment." -- emphasis mine
这意味着conda update
将不会更新某些软件包,如果更新可能会使其他软件包的稳定性受到威胁.因此,conda update -all
可能会优先考虑稳定性而不是最近的版本.鉴于conda update numpy
正在优先考虑numpy更新,而对整体稳定性的要求却很小/根本没有考虑.
This means that conda update
will not update some packages if updating may put the stability of other packages at risk. As such, conda update -all
is likely prioritizing stability over more recent builds. Whereas, conda update numpy
is prioritizing the numpy update with minimal/no regard to overall stability.
作为一个旁注,我以前曾破坏了软件包安装的稳定性,因为其他安装正是这样做的-将单个软件包更新为最新版本.
As a side note, I have previously broken package stability for other installs doing exactly that -- updating a single package to its most recent version.
这篇关于为什么`conda update --all`不全部更新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!