본문 바로가기
Python

[Mac] Anaconda+Tensorflow 설치(Miniforge3)

by ejxousiva(ἐξουσία) 2023. 12. 27.
반응형

Miniforge3(Tensorflow) 설치

# <https://github.com/conda-forge/miniforge>
# Miniforge3-MacOSX-arm64.sh 다운로드
chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh
sh ~/Downloads/Miniforge3-MacOSX-arm64.sh
# return, 쭉 내리고 yes, return, yes
source ~/miniforge3/bin/activate

conda create -n 가상환경명 python=3.8
conda activate 가상환경명

conda install -c apple tensorflow-deps

python -m pip install tensorflow-macos
python -m pip install tensorflow-metal
conda install -c conda-forge -y pandas jupyter
pip install tensorflow_datasets

가상환경 설치

# 가상환경 생성
conda create --name "가상환경명" python="3.8"
conda create --name "가상환경명" anaconda

# 가상환경 목록 확인
conda info --envs

# 가상환경 활성화
conda activate "가상환경명"

# 가상환경 비활성화
conda deactivate

# 가상환경 삭제
conda remove --name "가상환경명" --all
conda env remove -n "가상환경명" 

업데이트

conda update conda

Jupyter Notebook 설치 & 실행

conda install jupyter notebook
jupyter notebook

실행 및 종료

# 실행하기
conda info --envs
conda activate tensorflow
jupyter notebook

# 종료하기
ctrl + c
conda deactivate