Windows安裝Anaconda并且配置國(guó)內(nèi)鏡像的詳細(xì)教程
在學(xué)習(xí)OpenCV或者其他關(guān)于Python技術(shù)的時(shí)候,我們通常需要準(zhǔn)備不同的Python環(huán)境,我選擇了Anaconda作為我的Python環(huán)境管理器。
前言
我們?cè)趯W(xué)習(xí) Python 的時(shí)候需要不同的 Python 版本,關(guān)系到電腦環(huán)境變量配置換來(lái)?yè)Q去很是麻煩,所以這個(gè)時(shí)候我們需要一個(gè)虛擬的 Python 環(huán)境變量,我之前也裝過(guò) virtualenv、virtualenvwrapper、Venv 換來(lái)?yè)Q去麻煩命令一大堆,記不住,最后選擇 Anaconda,用一個(gè)代替全部,只要記住 conda 命令和 pip 命令就好了,不僅省事還方便。conda 命令可以看這個(gè)文章https://ahtelekb.gitee.io/posts/3ca71393/,pip 命令可以看這個(gè)文章https://ahtelekb.gitee.io/posts/41c47cc0/,都是我查閱資料總結(jié)好的,放心食用。
下載 anaconda
anaconda 官網(wǎng)是在國(guó)外,我們?cè)L問(wèn)的適合會(huì)很卡,下載慢。我提供了一些國(guó)內(nèi)高校鏡像供大家參考。
官網(wǎng)
https://repo.anaconda.com/archive/
https://anaconda.org.cn/
國(guó)內(nèi)鏡像
https://mirrors.bfsu.edu.cn/anaconda/archive/
https://mirrors.xjtu.edu.cn/anaconda/archive/
https://mirror.bjtu.edu.cn/anaconda/archive/
https://mirrors.hit.edu.cn/anaconda/archive/
https://mirrors.aliyun.com/anaconda/archive/?spm=a2c6h.25603864.0.0.2da34eb925S2Ym
以清華源的 Anaconda3-2022.10-Windows-x86_64 展示(點(diǎn)擊即可下載)
https://mirrors.bfsu.edu.cn/anaconda/archive/Anaconda3-2022.10-Windows-x86_64.exe
安裝 anaconda
無(wú)腦下一步,這兩個(gè)都勾選上
變量環(huán)境
設(shè)置->系統(tǒng)->系統(tǒng)信息->高級(jí)系統(tǒng)設(shè)置->環(huán)境變量->用戶變量->Path下檢查有沒(méi)有這五個(gè)變量,沒(méi)有就加上
配置國(guó)內(nèi)源
在 Windows 默認(rèn)是沒(méi)有.condarc文件的,我們需要 win+r 輸入 cmd 回車,在 cmd 命令行中輸入conda config --set show_channel_urls yes
conda config --set show_channel_urls yes
在C:\Users\你的用戶名目錄下會(huì)生成.condarc文件
將配置文件復(fù)制到復(fù)制到.condarc 文件
channels: - defaults show_channel_urls: true default_channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 custom_channels: conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
如下圖所示
測(cè)試
# 清除索引緩存 conda clean -i conda create -n name
參考資料
https://www.jianshu.com/p/e39cb192bde0
https://mirror.nju.edu.cn/help/anaconda
https://mirrors.pku.edu.cn/Help/Anaconda
https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
https://mirrors.bfsu.edu.cn/help/anaconda/
到此這篇關(guān)于Windows安裝Anaconda并且配置國(guó)內(nèi)鏡像教程的文章就介紹到這了,更多相關(guān)Windows安裝Anaconda內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Python Pandas中根據(jù)列的值選取多行數(shù)據(jù)
這篇文章主要介紹了Python Pandas中根據(jù)列的值選取多行數(shù)據(jù)的實(shí)例代碼,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì) ,需要的朋友可以參考下2019-07-07nginx+uwsgi+django環(huán)境搭建的方法步驟
這篇文章主要介紹了nginx+uwsgi+django環(huán)境搭建的方法步驟,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-11-11使用memory_profiler監(jiān)測(cè)python代碼運(yùn)行時(shí)內(nèi)存消耗方法
今天小編就為大家分享一篇使用memory_profiler監(jiān)測(cè)python代碼運(yùn)行時(shí)內(nèi)存消耗方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2018-12-12詳解通過(guò)API管理或定制開(kāi)發(fā)ECS實(shí)例
在本文里我們給大家整理了關(guān)于通過(guò)API管理或定制開(kāi)發(fā)ECS的相關(guān)實(shí)例內(nèi)容,有需要的朋友們參考學(xué)習(xí)下。2018-09-09使用IPython來(lái)操作Docker容器的入門指引
這篇文章主要介紹了使用IPython來(lái)操作Docker容器的方法,包括一些基本的搭建和連接,主要依靠docker-py模塊,需要的朋友可以參考下2015-04-04Python多進(jìn)程方式抓取基金網(wǎng)站內(nèi)容的方法分析
這篇文章主要介紹了Python多進(jìn)程方式抓取基金網(wǎng)站內(nèi)容的方法,結(jié)合實(shí)例形式分析了Python多進(jìn)程抓取網(wǎng)站內(nèi)容相關(guān)實(shí)現(xiàn)技巧與操作注意事項(xiàng),需要的朋友可以參考下2019-06-06