conda install 报错PackagesNotFoundError: 以及和合理使用源的策略

1、清华源

https://blog.csdn.net/WannaSeaU/article/details/88427010
添加清华镜像至Anaconda仓库
运行以下命令,将清华镜像添加至Anaconda仓库中

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes

Conda Forge

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

msys2

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/

bioconda

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/

menpo

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/

pytorch

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

#for legacy win-64

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/peterjc123

2、如果清华源找不到就到官方源

conda install pytorch torchvision cudatoolkit=9.0 -c pytorch

这是因为-c参数指明了下载pytorch的通道

3、使用官方 conda-forge

conda install -c conda-forge jupyter_contrib_nbextensions

4、查找这个包的位置

https://blog.csdn.net/weixin_38076506/article/details/105264630
首先输入 anaconda search -t conda xxxxx(你要安装的package名字),查看
在这里插入图片描述
根据提示的内容调整你的环境,如python版本,操作平台(这个最麻烦),调整后重新输入:

conda install -c https://conda.anaconda.org/pytorch faiss-gpu(你的packge名字),其中https://conda.anaconda.org/pytorch是查询上图中Name那一列得到的,我这里要安装pytorch对应的faiss-gpu包,所以是这个路径。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值