tensorflow-deps - PackagesNotFoundError

Hi all,

I'm using my new M1 Pro with the latest Mac OS 12.1 and I'm experiencing issues with installing tensorflow.

I've created an environment and have it activated.

I tried

conda install -c apple tensorflow-deps

but returned with

Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  • tensorflow-deps

Current channels:

  • https://conda.anaconda.org/apple/osx-64
  • https://conda.anaconda.org/apple/noarch
  • https://repo.anaconda.com/pkgs/main/osx-64
  • https://repo.anaconda.com/pkgs/main/noarch
  • https://repo.anaconda.com/pkgs/r/osx-64
  • https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

Note: you may need to restart the kernel to use updated packages.

Did anyone have the same issue and any advice to address this?

Thanks, Andrew

Post not yet marked as solved Up vote post of Andrew14 Down vote post of Andrew14
17k views
  • Facing the same issue, MacOS Big Sur 11.0.1, M1 2020. Didn't resolve yet.

  • I use Mac M1 air and got the same problem. I've tried several methods (including other suggestions below) but all ended up encountering the PackagesNotFoundError. Does anyone know how to resolve it?

Add a Comment

Replies

Hi @Andrew14

I am unable to reproduce this issue when following the instructions at https://developer.apple.com/metal/tensorflow-plugin/ for arm64. Let me know if you are still facing this issue.

  • I have a similar issue: I cannot install tensorflow-deps. It seems the error is slightly different (UnsatisfiableError vs PackagesNotFoundError). This is a new raw conda environment installed as in the instructions.

    `(base) ➜ ~ conda install -c apple tensorflow-deps Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: | Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed UnsatisfiableError: The following specifications were found to be incompatible with each other: Output in format: Requested package -> Available versions (base) ➜ ~ uname -a Darwin *** 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:29:10 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T8101 arm64 (base) ➜ ~ file $(which python) /Users/***/miniconda3/bin/python: Mach-O 64-bit executable arm64 (base) ➜ ~ python --version Python 3.8.11
  • Got exactly the same error. Were you able to resolve it?

  • I want to chime in with Frameworks Engineer, that metal/tensorflow-plugin doc is the right path. I had been following “How To Install TensorFlow on M1 Mac (The Easy Way)” https://caffeinedev.medium.com/how-to-install-tensorflow-on-m1-mac-8e9b91d93706 written now about a year ago. 

    As suggested on the Miniforge GitHub, I had installed Miniforge with homebrew. I think that led me astray. In any case I did brew uninstall miniforge then followed the steps on the Apple page and it worked for me.

The same problem on my Monterey 12.1:

$ conda create --prefix ./env python=3.8
$ conda activate ./env
$ conda install -c apple tensorflow-deps
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - tensorflow-deps

Current channels:

  - https://conda.anaconda.org/apple/osx-64
  - https://conda.anaconda.org/apple/noarch
  - https://conda.anaconda.org/conda-forge/osx-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://conda.anaconda.org/main/osx-64
  - https://conda.anaconda.org/main/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.
Add a Comment

same problem here, I cannot understand why a Mac M1 has so many problems with TensorFlow... I hope someone will fix it soon, because I bought a Mac M1 to do deep neural networks faster...

I'm having the same issue. I've been through multiple different approaches. MacAir M1, 2020, BigSur 11.6

conda install -c apple tensorflow-deps

Collecting package metadata (current_repodata.json): done

Solving environment: failed with initial frozen solve. Retrying with flexible solve.

Collecting package metadata (repodata.json): done

Solving environment: failed with initial frozen solve. Retrying with flexible solve.



PackagesNotFoundError: The following packages are not available from current channels:



  - tensorflow-deps



Current channels:



  - https://conda.anaconda.org/apple/osx-64

  - https://conda.anaconda.org/apple/noarch

  - https://repo.anaconda.com/pkgs/main/osx-64

  - https://repo.anaconda.com/pkgs/main/noarch

  - https://repo.anaconda.com/pkgs/r/osx-64

  - https://repo.anaconda.com/pkgs/r/noarch



To search for alternate channels that may provide the conda package you're

looking for, navigate to



    https://anaconda.org



and use the search bar at the top of the page.
  1. Check for any old existing python installation. In my case it was anaconda. You can put command "which python" to check if it points to miniforge python installation, if not then delete the installation is it pointing to.

  2. Restart the terminal and install miniforge or update it with "bash filename_miniforge -u". Check "which python", if it doesn't point to miniforge then restart terminal

  3. You must be good to go for creating environment and next steps to install tf

  • which python returns "/usr/local/Caskroom/miniforge/base/envs/tensorflow-mac/bin/python" - still having the same issue as describes above

    EDIT:

    I initially followed another tutorial which installed mini forge through homebrew. I uninstalled and followed the the already mentioned tutorial (https://developer.apple.com/metal/tensorflow-plugin/) and it worked - all tough I have no clue when to use source ~/.../activate or conda activate or when to use python -m pip or just pip - many small differences in both tutorials which may made a difference, but I think it was about the brew condo installation

  • Thanks @pratikjadhav2726... that solved it!

Use miniforge instead of miniconda or anaconda. This works for me.

Go to Anaconda.org and search for the package (file), download and install it locally. it works for my Mac pro AMD

On my side, I had the problem and look a little before installing manually or installing miniforge.

The thing is that conda from miniconda or anaconda looks by default on osx-64 and noarch architecture and not osx-arm64 (which is the architecture on which the package has been made).

So just parameterize your conda (in ~/.condarc for me) by adding those lines:

subdirs:
  - osx-arm64
  - osx-64
  - noarch

If you want conda to go looking in osx-arm64 by default, change also the value of subdir and set it with osx-arm64 (same file):

subdir: osx-arm64

Hope it helps.

  • worked like a charm, thank you sir

  • thank you, this worked

  • same here. created an account just to thank you.

Hi ShamoX, could you please show me how do I add the lines into /.condarc? I can't find it anywhere in my Finder... I downloaded anaconda, miniforge, literally everything and still stuck on this problem :( Thank you...

  • You can just type code ~/.condarc in your terminal to open it with VSCode or vim ~/.condarc to open it in the terminal with vim in order to edit it.

  • from a terminal, vim ~/.condarc. The file may be empty, but just those lines and save the file.

Add a Comment

I'm meeting this exact problem, tried so many solutions but all failed... Anyone meeting this issue recently but was managed to solve it?

Hello everyone,

I was facing this exact issue when trying to run a gesture detection library. Problem was that the platform version reported by Anaconda was not the arm one, but rather 'macOS-10.16-x86_64-i386-64bit' and tensorflow-deps is only available for osx-arm64. I fixed this by doing a clean install for Anaconda (https://docs.anaconda.com/anaconda/install/uninstall/) and then followed the steps on https://developer.apple.com/metal/tensorflow-plugin/ to install Tensorflow.

Version reported after clean install: 'macOS-13.0.1-arm64-arm-64bit'

I was then able to install tensorflow-deps, tensorflow-macos & tensorflow-metal. Tensorflow implementation worked after this.

Credit: https://www.youtube.com/watch?v=BEUU-icPg78

P.D.: I am really new to programming so please forgive me if any technical info is inaccurate.

Add a Comment

This video really helped! https://www.youtube.com/watch?v=BEUU-icPg78 (TensorFlow: Mac M1/M2: Conda | tensorflow-deps - PackagesNotFoundError from Jeff Heaton)

Getting the same error

What helped me is just updating conda right before installing tensorflow-deps. This is:

bash ~/miniconda.sh -b -p $HOME/miniconda
source ~/miniconda/bin/activate
conda update conda
conda install -c apple tensorflow-deps

For those who encountered this problem, check if your anaconda installed in your silicon mac is arm64 version rather than the x86_64 version. You can do this by running conda info. One of the lines shall say __archspec=1=arm64, if you saw __archspec=1=x86_64, running conda install -c apple *** makes conda looking for the x86_64 version of *** pacakge (fortunately tensorflow-deps only has arm64 version otherwise many of us would keep living with the mismatched version of tensorflow-deps on our apple silicon).

I saw some replies saying after trying miniforge/miniconda, the installation works. This is because when they switched to miniforge/miniconda, they installed it with the correct __archspec.

If you see your anaconda installed with mismatch archictecture, go to bottom of https://www.anaconda.com/products/distribution#macos to grab the right one.

P.S. If the way you installed anaconda on your apple silicon mac is by simply googling, it's highly possible you installed the wrong one. Anaconda installation tutorial ignores what platform we visit its page, and just gives x86_64 mac installation instruction by default :(

  • Thank you so much! This fixed everything

  • yes absolutely rigth i read your comment and get an idea we don't read properly we need to read the comments i get my answer from your one liner is so simple but when u don't know the basic things or the env (X,Y,X) hardware and version fights we are stuck !

Add a Comment