日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

anaconda降级python_anaconda python更换清华源

發布時間:2025/3/15 python 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 anaconda降级python_anaconda python更换清华源 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

前言

在使用anaconda python環境過程中你會發現使用conda下載包的速度非常的慢,因為使用的是國外的服務器,所以這里要設置為國內的鏡像。使用下面的配置命令即可:

添加Anaconda的TUNA鏡像

conda config --add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/' //TUNA的help中鏡像地址加有引號,需要去掉#

conda config --add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/'

conda config --setshow_channel_urls yes //設置搜索時顯示通道地址

添加后

(base) C:\Users\aikera>conda config --show channels

channels:

- 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/'

- 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'

- defaults

- conda-forge

還有簡單粗暴地方法:直接修改conda的配置,一般在當前用戶路徑下,比如C:\Users\Administrator.condarc

.condarc具體內容如下:

channels:

- 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/'

- 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'

- defaults

- conda-forge

驗證

conda config --show

(base) C:\Users\aikera>conda config --show

add_anaconda_token: True

add_pip_as_python_dependency: True

aggressive_update_packages:

- ca-certificates

- certifi

- openssl

allow_non_channel_urls: False

allow_softlinks: False

always_copy: False

always_softlink: False

always_yes: None

anaconda_upload: None

auto_update_conda: True

changeps1: True

channel_alias: https://conda.anaconda.org

channel_priority: True

channels:

- 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/'

- 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'

- defaults

- conda-forge

client_ssl_cert: None

client_ssl_cert_key: None

clobber: False

create_default_packages: []

custom_channels:

pkgs/r: https://repo.anaconda.com

pkgs/msys2: https://repo.anaconda.com

pkgs/main: https://repo.anaconda.com

pkgs/pro: https://repo.anaconda.com

pkgs/free: https://repo.anaconda.com

custom_multichannels:

local: []

defaults: ["https://repo.anaconda.com/pkgs/main", "https://repo.anaconda.com/pkgs/free", "https://repo.anaconda.com/pkgs/r", "https://repo.anaconda.com/pkgs/pro", "https://repo.anaconda.com/pkgs/msys2"]

default_channels:

- https://repo.anaconda.com/pkgs/main

- https://repo.anaconda.com/pkgs/free

- https://repo.anaconda.com/pkgs/r

- https://repo.anaconda.com/pkgs/pro

- https://repo.anaconda.com/pkgs/msys2

disallowed_packages: []

download_only: False

envs_dirs:

- D:\ProgramData\Anaconda2\envs

- C:\Users\aikera\AppData\Local\conda\conda\envs

- C:\Users\aikera\.conda\envs

測試:

安裝numpy試試:

(base) C:\Users\aikera>conda install numpy

Solving environment: /

WARNING: The remote server could not find the noarch directory for the

requested channel with url: https://conda.anaconda.org/'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/'

It is possible you have given conda an invalid channel. Please double-check

your conda configuration using `conda config --show`.

If the requested url is in fact a valid conda channel, please request that the

channel administrator create `noarch/repodata.json` and associated

`noarch/repodata.json.bz2` files, even if `noarch/repodata.json` is empty.

$ mkdir noarch

$ echo '{}' > noarch/repodata.json

$ bzip2 -k noarch/repodata.json

/

WARNING: The remote server could not find the noarch directory for the

requested channel with url: https://conda.anaconda.org/'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'

It is possible you have given conda an invalid channel. Please double-check

your conda configuration using `conda config --show`.

If the requested url is in fact a valid conda channel, please request that the

channel administrator create `noarch/repodata.json` and associated

`noarch/repodata.json.bz2` files, even if `noarch/repodata.json` is empty.

$ mkdir noarch

$ echo '{}' > noarch/repodata.json

$ bzip2 -k noarch/repodata.json

done

## Package Plan ##

environment location: D:\ProgramData\Anaconda2

added / updated specs:

- numpy

The following packages will be downloaded:

package | build

---------------------------|-----------------

numpy-1.15.0 | py27h911edcf_0 36 KB defaults

numpy-base-1.15.0 | py27hfef472a_0 3.8 MB defaults

llvmlite-0.24.0 | py27hc56fc5f_0 9.2 MB defaults

numba-0.39.0 | py27h39f3610_0 2.4 MB defaults

mkl_fft-1.0.4 | py27h31cbb53_1 121 KB defaults

mkl-2018.0.3 | 1 178.1 MB defaults

conda-4.5.10 | py27_0 1.0 MB defaults

blas-1.0 | mkl 6 KB defaults

------------------------------------------------------------

Total: 194.7 MB

The following NEW packages will be INSTALLED:

blas: 1.0-mkl defaults

mkl_fft: 1.0.4-py27h31cbb53_1 defaults

numpy-base: 1.15.0-py27hfef472a_0 defaults

The following packages will be UPDATED:

conda: 4.4.11-py27_0 defaults --> 4.5.10-py27_0 defaults

llvmlite: 0.20.0-py27_0 defaults --> 0.24.0-py27hc56fc5f_0 defaults

mkl: 2018.0.0-h36b65af_4 defaults --> 2018.0.3-1 defaults

numba: 0.35.0-np113py27_10 defaults --> 0.39.0-py27h39f3610_0 defaults

numpy: 1.13.3-py27h9ac254c_0 defaults --> 1.15.0-py27h911edcf_0 defaults

Proceed ([y]/n)? y

Downloading and Extracting Packages

numpy 1.15.0: ################################################################################################# | 100%

numpy-base 1.15.0: ############################################################################################ | 100%

llvmlite 0.24.0: ############################################################################################## | 100%

numba 0.39.0: ################################################################################################# | 100%

mkl_fft 1.0.4: ################################################################################################ | 100%

mkl 2018.0.3: ################################################################################################# | 100%

conda 4.5.10: ################################################################################################# | 100%

blas 1.0: ##################################################################################################### | 100%

Preparing transaction: done

Verifying transaction: done

Executing transaction: done

總結

以上是生活随笔為你收集整理的anaconda降级python_anaconda python更换清华源的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。