

- #ANACONDA FOR MAC M1 CHIP HOW TO#
- #ANACONDA FOR MAC M1 CHIP INSTALL#
- #ANACONDA FOR MAC M1 CHIP SOFTWARE#
- #ANACONDA FOR MAC M1 CHIP DOWNLOAD#

To check this, we can try to activate the (base) environment, we can do so using the source command.
#ANACONDA FOR MAC M1 CHIP INSTALL#
The above code should install Miniforge3 into your home directory ( ~/ stands for "Home" on Mac). chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh We'll then execute (run) the program using sh. To do so, we'll run the command chmod -x FILE_NAME which stands for "change mode of FILE_NAME to -executable". We've now got a shell file capable of installing Miniforge, but to do so we'll have to modify it's permissions to make it executable.
#ANACONDA FOR MAC M1 CHIP DOWNLOAD#
If you're using an M1 variant Mac, it's " Miniforge3-MacOSX-arm64" <- click for direct download.Ĭlicking the link above will download a shell file called Miniforge3-MacOSX-arm64.sh to your Downloads folder (unless otherwise specified). Download the most compatible version of Miniforge (minimal installer for Conda specific to conda-forge, Conda is another package manager and conda-forge is a Conda channel) from GitHub. It will explain what it's doing and what you need to do as you go.Ģ. The command to install Homebrew will look something like: Homebrew is a package manager that sets up a lot of useful things on your machine, including Command Line Tools for Xcode, you'll need this to run things like git. Installing package managers (Homebrew and Miniforge)
#ANACONDA FOR MAC M1 CHIP SOFTWARE#
Think of it like this: a package manager is a piece of software that helps you install other pieces (packages) of software. Note: You're going to see the term "package manager" a lot below. If you're new to creating environments, using a new M1, M1 Pro, M1 Max, M1 Ultra, M2 machine and would like to get started running TensorFlow and other data science libraries, follow the below steps.
#ANACONDA FOR MAC M1 CHIP HOW TO#
How to setup a TensorFlow environment on Apple Silicon using Miniforge (longer version) PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')] [PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU'), If it all worked, you should see something like: TensorFlow has access to the following devices: Print(f"TensorFlow has access to the following devices:\n") Import dependencies and check TensorFlow version/GPU access. conda install jupyter pandas numpy matplotlib scikit-learnġ2. python -m pip install tensorflow-datasetsġ1. (Optional) Install TensorFlow Datasets to run benchmarks included in this repo. python -m pip install tensorflow-metalġ0. Install Apple's tensorflow-metal to leverage Apple Metal (Apple's GPU framework) for M1, M1 Pro, M1 Max, M1 Ultra, M2 GPU acceleration.

Install base TensorFlow (Apple's fork of TensorFlow is called tensorflow-macos). Install TensorFlow dependencies from Apple Conda channel. Make and activate Conda environment with Python 3.8 (Python 3.8 is the most stable with M1/TensorFlow in my experience, though you could try with Python 3.x). Create a directory to setup TensorFlow environment. Sh ~/Downloads/Miniforge3-MacOSX-arm64.shĥ. Note: If you already have a version of Anaconda installed, it may cause conflicts when installing Miniforge (if you're using M1/Pro/Max/Ultra/M2, favour Miniforge because it's specifically designed for arm64 chips). Install Miniforge3 into home directory.Download Miniforge3 (Conda installer) for macOS arm64 chips (M1, M1 Pro, M1 Max, M1 Ultra, M2).Follow the steps it prompts you to go through after installation.

If you're experienced with making environments and using the command line, follow this version. How to setup a TensorFlow environment on Apple Silicon using Miniforge (shorter version) The code from the video is from my M1 machine learning speed test GitHub repo. You can find a step by step video version of this article on YouTube. If you have issues, please post them on the GitHub Issues page so others can see. If you're experienced at setting up environments, the shorter text-based instructions should be enough. If you're new to setting up environments and software packages, watch the video version alongside the longer text-based instructions below. This post: teaches you how to install the most common machine learning and data science packages (TensorFlow, pandas, NumPy, Jupyter, matplotlib, scikit-learn) on your machine and make sure they run using sample code. You: have a new Apple Silicon Mac (any of the M1 or M2 variants) and would like to get started doing machine learning and data science on it. Let's get your Apple Silicon Mac (any M1 or M2 variant) setup for machine learning and data science.
