0
0

More than 1 year has passed since last update.

conda環境の保存と生成(environment.ymlを使用)

Posted at

検証環境

  • conda: 22.9.0
    • conda --versionでバージョンを確認できる
    • バージョンが異なる場合は、公式ドキュメントの該当バージョンを確認
  • linux: Ubuntu 20.04.5 LTS
    • lsb_release -aでubuntuのバージョンを確認
    • ほかのOSでは動作を確認していないが、condaのバージョンが同じであれば、動くものと思われる

公式ドキュメント

  • 詳細はこちらを確認
    • 本記事ではSharing an environmentの項目を参考にしている

注意

  • 以下の内容は上記の環境を前提にしています
  • より新しいcondaのバージョンでは以下のコマンドが動かない可能性があるので、公式ドキュメントを確認することを強く勧めます

保存

export
conda activate [env_name]
conda env export --from-history > environment.yml

生成

create
conda env create -f environment.yml
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0