Anaconda安装库时出现以下错误
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
解决办法:
show_channel_urls: true
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
channel_alias: h...
文章目录一、报错信息二、解决方案(一)常规安装命令(二)搜索工具包(三)显示安装细节(四)安装工具包
一、报错信息
在conda环境下,安装
python包的时候,出现报错:
PackagesNotFoundError: The
following packages are not
available from
current channels。
二、解决方案
(一)常规安装命令
conda install package_name
但是当
python包找不到的时候,会出现报错:
(二)搜索工具包
很多小白刚接触Python-docx库时 面临的第一个错误就是PackageNotFoundError(docx.opc.exceptions.PackageNotFoundError: Package not found at '/Users/(用户名)/Desktop/(文件名).docx'
这类错误 就是 找不到目标文件 有以下原因:
1 目标文件为空
2 路径错误 不妨绝对路径和相对路径换着试一下
3 文件后缀名混淆 doc与docx混淆不清,两者虽然都是Word文本格式 但是俩者有很多差.
PackagesNotFoundError: The following packages are not available from current channels
应该是路径中没有添加需要安装包所在的channel导致,可以通过下面的方法彻底解决:
终端中输入代码:
conda config --add channels conda-forge
再通过conda或者pip安装自己需要的包...
直接运行 conda install cudatoolkit=10.2出错
PackagesNotFoundError: The
following packages are not
available from
current channels:
- cudatoolkit=10.2
To search for alternate
channels that may provide the conda p...