インストールプロセス
1 インストールパッケージをダウンロードする
公式ウェブサイト
https://www.anaconda.com/download#downloads
2 インストールを実行する
bash Anaconda3-2021.11-Linux-x86_64.sh
3 インストールプロセス
Enter+yes を最後まで押して、ライセンスに同意し、インストール パスとinitを指定すると、インストールが完了します。
anaconda が正常にインストールされていることを確認します。
conda --version
また
conda -V
仮想環境を作成する
conda create -n test python=3.7.5
Linux で anaconda のソースを変更する
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
- 検索パスを表示
conda config --set show_channel_urls yes
conda config --get channels
- ミラーチャンネルを表示
conda config --show channels
- 変更を保存するには、次のコマンドを入力します。
source ~/.bashrc
完了したら、コマンドを入力して構成ファイルを表示します
vim ~/.condarc
(必要に応じて) デフォルトのソースに戻します
conda config --remove-key channels
pytorch公式ウェブサイト
https://pytorch.org/get-started
pytorchをインストールする
コマンドを使用すると:
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.6
次のものを追加しないでください: -c pytorch
、-c conda-forge
使用しないでください:
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.6 -c pytorch -c conda-forge