conda create --name {Name of environment} python={package_spec : Python Version}
ex) conda create --name env01 python=3.6
- -n ENVIRONMENT : --name ENVIRONMENT : Name of environment
새로운 가상환경을 활성화하여 확인
conda activate {envname}
ex) conda activate env01
conda env list
conda info --envs
- -e : --envs : List all known conda environments.
conda env remove -n {Name of environment}
- -n ENVIRONMENT : --name ENVIRONMENT : Name of environment
conda activate {env_name_or_prefix}
ex) conda activate env01
- env_name_or_prefix : The environment name or prefix to activate.
If the prefix is a relative path, it must start with './' (or '.\' on Windows).
conda deactivate
conda create --name [변경할이름] --clone [기존환경이름]
- --clone ENV : Path to (or name of) existing local environment.
conda activate [변경할이름]
conda remove --name [기존환경이름] --all
conda env export -n {Name of environment} -f {name of file}
- -n ENVIRONMENT : --name ENVIRONMENT : Name of environment
- -f FILE, --file FILE environment definition file (default: environment.yml)
conda env create -f environment.yml
- -f FILE, --file FILE environment definition file (default: environment.yml)
conda pack --name {Name of environment} --output {The path of the output file}
ex)
conda pack -n env -o /Users/mac/Downloads/env.zip
conda pack -n my_env -o my_env.tar.gz (현 디렉토리에 저장)
- --name ENV, -n ENV : The name of the environment to pack.
If neither --name nor --prefix are supplied, the current activated environment is packed.
- --output PATH, -o PATH :The path of the output file. Defaults to the environment name with a
.tar.gz
suffix (e.g.my_env.tar.gz
).
conda pack으로 압축한 파일을 /Users/mac/opt/anaconda3/envs/{환경이름} 에 압축 해제