M1 Miniconda 설치 및 가상 환경 설정
1. miniconda 설치 및 환경 설정
1.1 brew로 miniconda 설치
$brew search miniconda
$brew install miniconda
1.2 환경변수 설정
$vi ~/.zshrc
export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH"
$source ~/.zshrcs
$which python
$conda init zsh
$source ~/.zshrcs
2. conda 가상 환경 설정
2.1 가상 환경 만들기
$conda create -n env01 python=3.6
$conda create -n env01 python=3.8
2.1.1 conda create issue
- Python 3.6, 3.7 builds for osx-arm64 were never part of the regular build matrix for Conda Forge
$conda create -n env01 python=3.6
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- python=3.6
Current channels:
- https://conda.anaconda.org/conda-forge/osx-arm64
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
2.2 가상 환경 리스트 확인
$conda env list
2.3 가상 환경 실행
$conda activate env01
2.4 kernel 생성
- Installed kernelspec env01 in /Users/imok/Library/Jupyter/kernels/env01
$conda install -c conda-forge -y ipykernel
$python -m ipykernel install --user --name env01 --display-name 'env01'
2.5 jupyterlab 설치 및 실행
$conda install -c conda-forge -y jupyter
$conda install -c conda-forge -y jupyterlab
$jupyter lab