

Requirement already satisfied: torch in /Users/PLEB/opt/anaconda3/envs/pytorch/lib/python3.8/site-packages (1.9.0) Base on the architecture, it will add a prefix to your environment nameĪdd the following function to ~/.zshrc or ~/.Currently, I have pytorch installed from this, which appears to be from anaconda.if you're running a terminal with rosetta, it will run with x86 This function checks which architecture your current shell is using.Have a terminal (Terminal or iTerm app) running with rosetta (for 圆4)Īdd shortcut to create the environment what does this do?.Have Conda installed (anaconda / miniconda / miniforge3).Pip install tensorflow-macos tensorflow-metal In my case I needed an arm64 environment to install tensorflow-macos. Once activated you can install packages accordingly. Now to create a python 3.9.13 osx-64(x86_64) environment with the name env_x86: create_x86_conda_environment env_x86 python=3.9.13Īlternatively for osx-arm64 (arm64) environment: create_ARM_conda_environment env_ARM python3.9.13 # example usage: create_ARM_conda_environment myenv_x86 python=3.9ĬONDA_SUBDIR=osx-arm64 conda create -n activate $1 # example usage: create_x86_conda_environment myenv_x86 python=3.9ĬONDA_SUBDIR=osx-64 conda create -n activate $1 The code will add two shortcut functions to create either an osx-64 or osx-arm64 conda environment. Then execute is with: sh Miniforge3-MacOSX-arm64.sh You may need to enable execution of the shell script with: chmod +x Miniforge3-MacOSX-arm64.sh Ensure you select arm64 (Apple Silicon) architecture. Install miniforge3 by downloading the shell script from here. Some of my projects relied on python dependencies that were only supported in either one or the other architecture not both: specifically tensorflow. I found adding conda config -env -set subdir osx-arm64 changes the option globally which created issues for me. How to configure python conda Environments for both arm64 and x86_64 on M1 Apple SiliconĪdding to the answers, it is possible to configure conda to use both osx-arm64(arm64) and osx-64(x86_64) architectures.
