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

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) >

Miniconda安装及搭建

發(fā)布時(shí)間:2023/11/23 66 coder
生活随笔 收集整理的這篇文章主要介紹了 Miniconda安装及搭建 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Miniconda安裝配置

下載Miniconda

Miniconda下載地址

最新版 Miniconda For Windows 下載鏈接

Windows 安裝配置

修改Powershell執(zhí)行策略(Windows10+非家庭版需要操作)

開始圖標(biāo)右鍵單擊,選擇 Windows PowerShell(終端管理員)

先輸入下面的內(nèi)容,并回車:

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

出現(xiàn)如下內(nèi)容后,輸入:A,回車:

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution
policy might expose you to the security risks described in the about Execution Policies help
topic at https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): -

最后在 Anaconda Powershell Prompt 中輸入:

conda init

Conda更換鏡像源

清華大學(xué)開源軟件鏡像站

Anaconda Powershell Prompt 中輸入:

conda config --set show_channel_urls yes

然后在 Anaconda Powershell Prompt 中輸入:

notepad .condarc # 注意有個(gè)小點(diǎn) "." 在 "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
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

粘貼上面在鏡像站復(fù)制的文本,保存文件后關(guān)閉

最后在 Anaconda Powershell Prompt 中輸入:

conda clean -i # 清除源緩存,以啟用鏡像源

PyPI更換鏡像源

校園網(wǎng)聯(lián)合鏡像站

# 設(shè)置 PyPI 鏡像源
pip config set global.index-url https://mirrors.cern

復(fù)制上述文本后,在 Anaconda Powershell Prompt 中粘貼運(yùn)行即可。

課程環(huán)境搭建

創(chuàng)建與激活CONDA環(huán)境

conda環(huán)境創(chuàng)建: conda create -n p2s python=3.10

(-n代表創(chuàng)建的環(huán)境名稱,這里是p2s,并指定Python版本為3.10)

激活conda環(huán)境:conda activate p2s

刪除某個(gè)CONDA環(huán)境

退出該環(huán)境:conda deactivate

刪除整個(gè)環(huán)境:conda remove -n p2s --all

Pip安裝與展示

Pip安裝課程所需第三方庫(kù):pip install jupyter

在指定文件夾輸入:jupyter lab(會(huì)自動(dòng)跳轉(zhuǎn)到瀏覽器)

結(jié)束學(xué)習(xí)時(shí):Ctrl + C (關(guān)閉Jupyter Notebook 服務(wù))

總結(jié)

以上是生活随笔為你收集整理的Miniconda安装及搭建的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。