Introduced Mac (M1) TensorFlow (recommended for those who have installed python by themselves)

This article itself I wrote it about a month ago From there, I stumbled on Keras and Pillow after this and avoided it. I will post the URL of the article


Started introducing Tensorflow with reference to a certain article But if you install python from Anaconda or Python official I found that I was quite stumbling, so I will leave the way I actually avoided

―――――――――――――――――――――――――――――――――――― As an error that I encountered before moving on to the workaround TensorFlow-macos exists when I check it with pip3 list No module when import tensorflow ――――――――――――――――――――――――――――――――――――

By the way, the following is "a certain article" If you have not installed it individually, you can install TensorFlow only with the above article.


M1 MacBook Pro

Cause of error (guess)

In the first place, the cause of the error is the prompt

which python3 

When the output is


Do not become. By the way, the output at the time of failure is


was. Is the python you are using different? (Amateur doesn't know the details ...)

Then /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 Should I erase this? It became

Below, what I did (2 patterns)

Part 1 Delete the file by command or groping

See article below

You don't have to do the bash_profile part (Bash_profile1 was not found)

Part 2 Mac initialization (last resort when part 1 fails)

See article below

The following is what I actually did in the reference article (you can see it by comparing it with the reference article)

  1. Reboot
  2. Hold down R + Command + power button and wait for startup (I did this for M1)
  3. Select Erase Mac from Recovery Assistant on top left
  4. Therefore, erase execution
  5. When the storage initialization of "Restore macos from terminal" is completed ... I did it from the sentence
  6. All you have to do is follow along

When all is completed, please introduce TensorFlow by referring to the article posted at the top.

I wonder if there is an easier way ...

Recommended Posts

Introduced Mac (M1) TensorFlow (recommended for those who have installed python by themselves)
For those who should have installed janome properly with Python but get an error
Python3 TensorFlow for Mac environment construction
[2020 version for beginners] Recommended study method for those who want to become an AI engineer by themselves
For those who don't have Keras or TensorFlow on GPU on macOS Sierra
[Solved] I have a question for those who are familiar with Python mechanize.
Dart grammar for those who only know Python
For those who have done pip uninstall setuptools
[For those who have mastered other programming languages] 10 points to catch up on Python points
For those who are new to programming but have decided to analyze data with Python
Environment construction for those who want to study python easily with VS Code (for Mac)
For those who want to write Python with vim
For those who can't install Python on Windows XP
For those who are having trouble drawing graphs in python
For those who want to start machine learning with TensorFlow2