Miniconda(Conda) 및 Python 설치
미니콘다(콘다)
아나콘다의 깨끗하고 가벼운 버전.
특징
공식 페이지
Linux, macOS 또는 Windows에 설치
1. Miniconda(v3) 다운로드 및 설치
## Recommended path to install Miniconda:
# For example: ${HOME}/workspaces/runtimes/miniconda3
## Linux (x86_64):
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.11.0-Linux-x86_64.sh
bash Miniconda3-py38_4.11.0-Linux-x86_64.sh
## Linux (aarch64):
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh
bash Miniforge3-Linux-aarch64.sh
## macOS (Intel):
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.11.0-MacOSX-x86_64.sh
bash Miniconda3-py38_4.11.0-MacOSX-x86_64.sh
## macOS (Apple M1):
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
bash Miniforge3-MacOSX-arm64.sh
# Remove downloaded file:
rm -vrf Mini*.sh
# For bash:
# Load .bashrc file to init conda into current bash session:
source ~/.bashrc
# For zsh:
# Load .zshrc file to init conda into current zsh session:
source ~/.zshrc
# Clean conda caches:
conda clean -y -av
# Update conda to the latest version:
conda update -y conda
# Check installed conda version:
conda -V
2. 파이썬 설치
# Create a new conda environment with python and pip:
conda create -y -n py38 python=3.8.12 pip
# Set default conda environment to .bashrc:
## Linux:
echo "conda activate py38" >> ~/.bashrc
## macOS:
echo "conda activate py38" >> ~/.zshrc
# Activate new conda environment:
conda activate py38
# Upgrade pip to the latest version:
pip install -U pip
pip install pytest
# Clean pip caches:
pip cache purge
# Clean conda caches:
conda clean -y -av
# Check installed python and pip version:
python -V
pip -V
👍 ✨
설치 완료
용법
## Viewing a list of the packages in a conda environment:
conda list
# Or list packages of other conda environment:
conda list -n py38
## Viewing a list of conda environments:
conda env list
## Creating environment variables associated with Conda environments:
conda env config vars set PYTHONPATH="${PWD}:${PYTHONPATH}"
## Exporting conda environment to environment.yml file:
conda env export > environment.yml
## Creating conda environment from environment.yml file:
conda env create -f environment.yml
## Cloning a conda environment:
conda create -y -n py38_clone --clone py38
## Removing conda environment:
conda remove -y -n py38 --all
## Conda help:
conda -h
참조
Reference
이 문제에 관하여(Miniconda(Conda) 및 Python 설치), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/bybatkhuu/install-miniconda-conda-and-python-50o6텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)