问题
I installed Anaconda under Windows 10. Everything is working fine. I also ran
conda upgrade --all
in a command prompt.
However, I noticed that when I type this in a command prompt:
pip list -o
I get (among other things)
astroid (1.4.7) - Latest: 1.4.8 [wheel]
This means package astroid
is upgradable under pip. However, when I go to the Anaconda Navigator and look at the list of upgradable packages I do not see astroid
in it. (I was not able to find a command line way of seeing which packages are upgradable under Conda).
Can someone explain why astroid
appears as upgradable under Pip and not under Conda?
回答1:
The package list maintained by Anaconda is different than that of PyPI. It seems that astroid is not yet updated in the Anaconda package list.
You can either wait until the update is available in Anaconda, or you can temporarily use the version available via pip by uninstalling the conda version and installing the pip one:
conda remove astroid
pip install astroid
When Anaconda has updated, reverse those two commands to switch back:
pip uninstall astroid
conda install astroid
回答2:
It looks like Anaconda hasn't updated astroid
yet - their package list shows it as only available for v1.4.7 (select Python 3.5 in the top tab and Ctrl+F astroid
, or look on this page). However, astroid
have updated the PyPI repository where Pip fetches packages from, so v1.4.8 is available through Pip and not through Anaconda.
As for why the package hasn't been upgraded - I'm not quite sure. There's been plenty of time since the release and there's no explanation why they wouldn't upgrade, so I can't really tell. Installing via pip should be fine if you need the latest version, though.
来源:https://stackoverflow.com/questions/40938442/why-some-packages-are-upgradable-in-pip-not-in-conda