Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gangula-karthik/tensorflow-m1-mac
how to install tensorflow on your m1 mac. Making this tutorial as I experienced hell when i tried to install tensorflow
https://github.com/gangula-karthik/tensorflow-m1-mac
Last synced: 1 day ago
JSON representation
how to install tensorflow on your m1 mac. Making this tutorial as I experienced hell when i tried to install tensorflow
- Host: GitHub
- URL: https://github.com/gangula-karthik/tensorflow-m1-mac
- Owner: gangula-karthik
- Created: 2022-10-24T04:52:17.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-28T01:03:54.000Z (about 2 years ago)
- Last Synced: 2024-11-05T11:37:34.550Z (about 2 months ago)
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tensorflow-m1-mac
how to install tensorflow on your m1 mac. Making this tutorial as I experienced hell when i tried to install tensorflow# step 1: install miniconda
- First we need to remove anaconda if we have it installed already
```
conda install anaconda-clean
anaconda-clean
```
- After doing that you can run either of these 3 commands depending on where the anaconda3 folder is stored
```
rm -rf anaconda3
rm -rf ~/anaconda3
rm -rf ~/opt/anaconda3
```- Download miniconda package manager
Here is the link: https://docs.conda.io/en/latest/miniconda.html
![Screenshot 2022-10-24 at 1 01 16 PM](https://user-images.githubusercontent.com/56480632/197451872-e15dd5a4-e354-42a8-a82f-6bb18bf9dc29.png)
After downloading, just follow the instructions displayed.# step 2: verify python installation
- Checking python platform information
Go to your terminal and type in `python3`
and then run the code below
```
import platform
platform.platform()
```
You should have the same result as the screenshot below otherwise you have to reinstall python# step 3: install xcode
- You should also install xcode tools, to do that run the command below
`xcode-select --install`# step 4: Install jupyter and environment
- Download the `tensorflow-apple-metal-conda.yml` file and save the file to your Downloads folder
- After that change into the Downloads folder by doing `cd Downloads`
- Run this command `conda deactivate`
- After that do the following installations:
- `conda install -y jupyter`
- Run the command `conda env create -f tensorflow-apple-metal-conda.yml -n tensorflow`
- Now we need to activate and register our environment
- `conda activate tensorflow`
- `python -m ipykernel install --user --name tensorflow --display-name "Python 3.9 (tensorflow)"`# step 5: Testing
- To test the environment run the jupyter notebook by going to terminal and typing `jupyter notebook`
- open a new jupyter notebook file and change the kernel to tensorflow
- type in the following python code to test:
```
import tensorflow as tf
tf.__version__
```Congratulations, you have now installed tensorflow 🎉