Skip to content

Instantly share code, notes, and snippets.

@ishidur
Last active October 27, 2018 03:35
Show Gist options
  • Save ishidur/e43e69614132cb4aca13724eeea1b95d to your computer and use it in GitHub Desktop.
Save ishidur/e43e69614132cb4aca13724eeea1b95d to your computer and use it in GitHub Desktop.
anaconda周りのコマンド #package_manager #python #shell #macos #windows #ubuntu

TL;DR

定期的に以下を実行しよう

conda update conda -y && conda update --all -y && conda clean --all -y

アップデート関連

本体のアップデート

conda update anaconda

condaのアップデート

conda update conda

パッケージ一式のアップデート

conda update --all

一括アップデート

conda update conda -y && conda update --all -y

非推奨(あまり意味がないかも)

conda update anaconda -y && conda update conda -y && conda update --all -y && conda clean --all -y

Pythonのバージョンのアップデート

conda update python

バージョン指定

conda update python=3.5

仮想環境関連

仮想環境の作成

conda create -n <env name> <install module>

usage:

conda create -n py27 python=2.7 anaconda

仮想環境の確認

conda info -e

仮想環境の削除

conda remove -n <env name> --all

仮想環境をActiveにする

source activate <env name>

仮想環境を非Activeにする

source deactivate

クリーン関連

不要になったパッケージやキャッシュを削除

インデックスキャッシュ,ロックファイル,tarball,使っていないパッケージ,ソースキャッシュを削除.  

conda clean --all -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment