Home > Net >  Package CLU Installation Failed Despite Tensorflow Installed
Package CLU Installation Failed Despite Tensorflow Installed

Time:10-29

Environment:

  • Apple M1 Max
  • Conda Environment / Miniforge3 with Python 3.9

All tensorflow deps have been installed:

tensorboard               2.10.1                   pypi_0    pypi
tensorboard-data-server   0.6.1                    pypi_0    pypi
tensorboard-plugin-wit    1.8.1                    pypi_0    pypi
tensorflow-deps           2.10.0                        0    apple
tensorflow-estimator      2.10.0                   pypi_0    pypi
tensorflow-macos          2.10.0                   pypi_0    pypi
tensorflow-metal          0.6.0                    pypi_0    pypi

...

$ python
>>> import tensorflow as tf
>>> print(tf.__version__)
2.10.0

Everything looks good, however when I go to install CLU (https://pypi.org/project/clu/) I receive an error saying that tensorflow can't be found.

Here is what I tried:

$ pip install clu==0.0.7
...
Collecting etils[epath]
  Using cached etils-0.8.0-py3-none-any.whl (127 kB)
Collecting jaxlib
  Using cached jaxlib-0.3.22-cp39-cp39-macosx_11_0_arm64.whl (54.5 MB)
ERROR: Could not find a version that satisfies the requirement tensorflow (from clu) (from versions: none)
ERROR: No matching distribution found for tensorflow

ERROR: Could not find a version that satisfies the requirement tensorflow (from clu) (from versions: none) ERROR: No matching distribution found for tensorflow

How can this be? Is it because it is under tensorflow-deps? Would there be a way to redirect this/alias to tensorflow for it to be recognized in my conda environment? Let me know if anyone has ran into this issue before.

CodePudding user response:

A quick workaround (not great) was to:

  1. Clone the CLU repo (https://github.com/google/CommonLoopUtils)
  2. Remove tensorflow library from the setup.py. Tensorflow will be recognized by the way you have installed it on your Mac with tensorflow-deps, etc.,
  3. Build the wheel
  4. Install in conda/env
  • Related