PackagesNotFoundError: The following packages are not available from current channels

Posted rb26dett

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PackagesNotFoundError: The following packages are not available from current channels相关的知识,希望对你有一定的参考价值。

今天python在安装一些包(xgboost,mlxtend)的时候遇到这个问题。

技术图片

按照其他博客的方法,如https://blog.csdn.net/miao0967020148/article/details/85230430可以解决,但是每次安装新包又会出现这个问题,最后看了其他一些博客,应该是路径中没有添加需要安装包所在的channel导致,可以通过下面的方法彻底解决:

终端中输入代码:

conda config --add channels conda-forge

再通过conda或者pip安装自己需要的包就不会再出问题了。

注意channel不一定是conda-forge,根据你需要安装包的类型,具体包属于那个类型可以通过代码来查看:

anaconda search -t conda 要安装的包

当然啦如果你需要安装的包比较少也可以直接按照上面给出链接的博客方法进行操作:)

以上是关于PackagesNotFoundError: The following packages are not available from current channels的主要内容,如果未能解决你的问题,请参考以下文章

无法安装 tensorflow:PackagesNotFoundError:当前渠道不提供以下软件包

PackagesNotFoundError:当前频道不提供以下软件包(libgcc-ng 和 libstdcxx-ng)

在 Mac OS Big Sur 11.0.1 上使用 anaconda 安装 Torch 时出现 PackagesNotFoundError

PackagesNotFoundError: The following packages are not available from current channels

Anaconda Prompt (Anaconda3),conda install安装python库时,出现PackagesNotFoundError的解决方案

无法在 anaconda 中安装 turicreate