Hi SanthoshSrinivas,
Did you use conda env? What python version are you using? There are only python 3.8 and python 3.9 packages currently available.
Post
Replies
Boosts
Views
Activity
Hi jbingl,
Try these:
conda create --name py39 python=3.9
conda activate py39
conda install -c apple tensorflow-deps
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal
Hi K_Krishna,
Did you install and activate Conda env? Did you install tensorflow-deps, tensorflow-macos, tensorflow-metal there?
Try python -m pip install tensorflow-macos --force-reinstall --no-deps, python -m pip install tensorflow-metal --force-reinstall --no-deps before running the code
Can you please provide the output of python -m pip list tensorflow, python -m pip show tensorflow-macos, python -m pip show tensorflow-metal after force-reinstalling
Hi Ironlegend,
Looks like you are using system's Python. Please make sure you to follow arm64 : Apple Silicon setup instructions and OS requirements.
Once you install Miniforge env run:
source ~/miniforge3/bin/activate
conda install -c apple tensorflow-deps
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal
Hello dkjdjdfdskln,
What macOS version are you using? OS requirements for the latest TensorFlow-macos is macOS 12.0+
Can you please provide a code sample that's failing?
When you create a new conda environment, please make sure to specify the environment you are installing packages to conda install package -n my_env, please try these:
conda activate my_env
conda install -c apple tensorflow-deps -n my_env or conda install -c apple tensorflow-deps --force-reinstall -n my_env
python -m pip install tensorflow-macos or python -m pip install --upgrade --force-reinstall tensorflow-macos
Hi Alex1075,
What commands are you running?
A couple of things you can try:
Running conda create --name py38 python=3.8 from conda base this worked for me.
Uninstall Miniforge, but before you do that that use conda pack to save your existing environment. Install: conda install -c conda-forge conda-pack, pack environment my_env into out_name.tar.gz: conda pack -n my_env -o out_name.tar.gz. You can un-tar out_name.tar.gz under freshly installed conda path ~/miniforge3/envs
Hope that helps!
Hi Roberto,
Thank you for your feedback! Glad it worked for you!
Best Regards,
Yuliya
Hi rmdev1960,
Can you please install the latest macOS beta and try again?
I installed macOS Monterey RC (21A558) on my 13-inch MacBook Air. Followed Getting Started with tensorflow-metal PluggableDevice to install the latest TensorFlow Plugin available and was able to execute the test code you provided without any issues on both python 3.8 and python 3.9 environments.
Hello rmdev1960,
Can you please share the script you are using or a piece of code where the script is crashing?
Hi there,
Where did you get this .whl file from?
I would recommend creating a fresh conda environment and following these steps where conda and pip will install the latest available versions.
Hello,
These commands worked for me:
# check the current tensorflow version
python -m pip list | grep tensorflow
# force upgrade tensorflow-deps first
conda install -c apple tensorflow-deps --force-reinstall
# or point to specific conda environment if you have one
conda install -c apple tensorflow-deps --force-reinstall -n my_env
# uninstall existing tensorflow-macos and tensorflow-metal
python -m pip uninstall tensorflow-macos
python -m pip uninstall tensorflow-metal
# install the latest
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal
# verify that you have the latest
python -m pip list | grep tensorflow
Hi there,
Looks like python packages compatibility broke when you tried to downgrade to tensorflow-deps==2.5. I would suggest creating a new conda environment and following the install steps to get the latest TensorFlow (instructions) or see commands (option #2) to install TensorFlow 2.5. If you don't specify any versions, you'll get all the latest versions by default (currently these are tensorflow-deps==2.6, tensorflow-macos==2.6, tensorflow-metal==0.2.0), which is recommended to use with macOS 12.0+ (How to update to the latest available macOS here)
To be able to use older versions, please be specific during the install:
conda install -c apple tensorflow-deps==2.5.0
python -m pip install tensorflow-macos==2.5.0
python -m pip install tensorflow-metal==0.1.2
Hope that helps!
Please try specifying tensorflow-deps version in a fresh conda environment like conda install -c apple tensorflow-deps==2.5.0