Packages listed multiple times for an environment in anaconda's “conda list”

跟風遠走 提交于 2020-01-07 03:56:07

问题


When I list packages in a conda environment, I get e.g. the following result:

$ conda list
# packages in environment at /Users/tkb/anaconda3/envs/xxx:
#
_nb_ext_conf              0.4.0                    py35_1  
anaconda-client           1.6.3                    py35_0  
appnope                   0.1.0                    py35_0  
backports.weakref         1.0rc1                    <pip>
bleach                    1.5.0                     <pip>
bleach                    1.5.0                    py35_0  
clyent                    1.2.2                    py35_0  
decorator                 4.0.11                   py35_0  
entrypoints               0.2.3                    py35_0  
html5lib                  0.999                    py35_0  
html5lib                  0.9999999                 <pip>
ipykernel                 4.6.1                    py35_0 
....

Some of the packages are present multiple times with different versions and differ in the third column. What effect does this have, and what does the third column mean?


回答1:


The third column tells you how the package was installed. If it has pyXX_Y, it was installed by conda, and the XX indicate the Python major and minor version (i.e., 35 is Python 3.5), and the build number of the package, which is an internal number used by conda to help judge which versions of a package are newer when the version of the software in the package is the same. If the third column says <pip>, the package was installed by pip. Sometimes, there's a fourth column when the package was installed by conda; this column indicates the channel the package was installed from (specified by -c or --channel in the install or create command).

As for what effect this has, it probably depends on the package. In general, the advice is to install packages into conda environments using conda whenever possible, because conda can't manage (uninstall, upgrade, etc.) packages that were installed by pip.



来源:https://stackoverflow.com/questions/45388115/packages-listed-multiple-times-for-an-environment-in-anacondas-conda-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!