Anaconda创建新的环境一直报错

Anaconda创建新的环境一直报错

报错信息如下:

CondaHTTPError: HTTP 404 NOT FOUND for url <https://pypi.tuna.tsinghua.edu.cn/simple/noarch/repodata.json>
Elapsed: 00:01.358961

The remote server could not find the noarch directory for the
requested channel with url: https://pypi.tuna.tsinghua.edu.cn/simple

As of conda 4.3, a valid channel must contain a `noarch/repodata.json` and
associated `noarch/repodata.json.bz2` file, even if `noarch/repodata.json` is
empty. please request that the channel administrator create
`noarch/repodata.json` and associated `noarch/repodata.json.bz2` files.
$ mkdir noarch
$ echo '{}' > noarch/repodata.json
$ bzip2 -k noarch/repodata.json

解决办法:镜像是http开头,不要写https

在这里插入图片描述

  • 查看所有的镜像信息
conda config --show-sources
  • 删除镜像
conda config --remove channels 镜像的网址
  • 添加镜像
# 添加新镜像源
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

Jupyter notebook中使用新安装的环境keras

1.打开Jupyter ,点击new,点击Terminal
在这里插入图片描述
2.激活你要加到jupyter里面的本地环境(keras)

conda activate keras

3.安装ipykernal

可以使用命令conda,但是速度很慢
conda install ipykernel
建议使用pip
pip install ipykernel -i https://pypi.mirrors.ustc.edu.cn/simple/

4.把本地环境注入到jupyter中

python -m ipykernel install --user --name keras --display-name "keras"

使用conda下载太慢

可以使用pip install 要下载的东西 然后-i 指定镜像源
镜像源

https://pypi.mirrors.ustc.edu.cn/simple/
https://pypi.tuna.tsinghua.edu.cn/simple
https//pypi.doubanio.com/simple/ 
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值