Back to feed
Renewal·마흔의 생활코딩

Setting Up TensorFlow on a Mac M1

NS
normalstory
cover image

Forty — a fine season for coding TensorFlow. 

I'm taking a class on visual intelligence AI. I had been using Colab the whole time, but to prepare for the final project I'm gradually moving the class material to my local machine. 
I don't have a computer with NVIDIA hardware, only a MacBook M1, so I looked up the necessary environment setup via Google and am leaving a record here for later.
Fortunately, the class is taught with Keras instead of PyTorch. 

 

Create a virtual environment  
python3 -m venv ~/venv-metal 

Activate the virtual environment
source ~/venv-metal/bin/activate

Update pip
python -m pip install -U pip  

Install TensorFlow 
python3 -m pip install tensorflow-macos
*option** python -m pip install tensorflow  

Install the TensorFlow Mac plugin
python -m pip install tensorflow-metal 

Install any other dependencies you need
pip install package-name 

Run Python 
python3 yourScript.py 

Other things to check - if you happen to get an error, 
Is the CLI (terminal) you're typing in actually running inside the virtual environment you installed?
Are the packages you installed installed inside the virtual environment you set up this time, rather than in another virtual environment or the base local environment? 
Is the IDE's Python interpreter the same version as the Python in the virtual environment you installed? 

 

 

For the related content I referred to the Mac official site. 
https://developer.apple.com/metal/tensorflow-plugin/ 

 

This English version was translated by Claude.

친절한 찰쓰씨
Written by
친절한 찰쓰씨

Pleasant Charles — UI/UX researcher at AIT. Keeping notes on design, planning, and slow days here since 2010.

More on the author's page

Keep reading

Renewal

Steadily, for the long haul, without burning out

Mar 31, 2026·9 min
Renewal

Tech-life balance

Feb 7, 2026·3 min
Renewal

Humanality, by Park Jeong-ryeol

Feb 7, 2026·11 min