0

I am running pixellib version 0.7.1 on Macos M1. It fails badly in image segmentation showing strange results. Some forums suggest downgrading tensorflow to 2.4.0. Here are the details from conda info:

    active environment : mlp
    active env location : /Users/saman/miniforge3/envs/mlp
            shell level : 1
       user config file : /Users/saman/.condarc
 populated config files : /Users/saman/miniforge3/.condarc
                          /Users/saman/.condarc
          conda version : 22.9.0
    conda-build version : not installed
         python version : 3.10.6.final.0
       virtual packages : __osx=13.0.1=0
                          __unix=0=0
                          __archspec=1=arm64
       base environment : /Users/saman/miniforge3  (writable)
      conda av data dir : /Users/saman/miniforge3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /Users/saman/miniforge3/pkgs
                          /Users/saman/.conda/pkgs
       envs directories : /Users/saman/miniforge3/envs
                          /Users/saman/.conda/envs
               platform : osx-arm64
             user-agent : conda/22.9.0 requests/2.28.1 CPython/3.10.6 Darwin/22.1.0 OSX/13.0.1
                UID:GID : 501:20
             netrc file : None
           offline mode : False

right now

conda install tensorflow = 2.4.0

Finds a million conflicts (guessing with all the pixellib packages) pip install also somehow fails

(mlp) saman@Samanss-MacBook-Air opencv-python-4.5.3.56 % pip install tensorflow==2.4.0
ERROR: Could not find a version that satisfies the requirement tensorflow==2.4.0 (from versions: none)
ERROR: No matching distribution found for tensorflow==2.4.0

I highly appriciate anyone helping me out of this.

Saman
  • 23
  • 4
  • I don't see any Conda channels shipping v2.4.0 - some ship v2.4.1, but only for `linux-64` platform. You will probably have to emulate (use `osx-64` Python) to get older PyPI versions of `tensorflow` to work. Maybe share `conda info` if you want more help. – merv Jan 10 '23 at 17:36
  • Thank you so much for the conda info hint. It revealed info that I did not know about the enviroment i am using. As I am new to this, I still cant figure where the tensorflow is installed and how i can downgrade it. zsh terminal acts like tensorflow doesn't exist whereas my code is clearly using it. – Saman Jan 10 '23 at 20:39
  • I am learning that tensorflow=2.4.1 would also totally do by the way – Saman Jan 10 '23 at 20:42
  • Note that the details in `conda info` are not just about the active environment - for example, the `python version : 3.10.6.final.0` refers to the **base** environment *not* the active environment. So you probably shouldn't have removed your info about `mlp` being Python 3.8. – merv Jan 11 '23 at 01:34
  • You can identify where a module is loading from with, e.g., `python -c 'import tensorflow as tf; print(tf.__path__)'`. – merv Jan 11 '23 at 01:37
  • You will not be able to install `Tensorflow 2.4` on `Python 3.10` as mentioned in this [build configuration](https://www.tensorflow.org/install/source#macos). Python 3.10 will only support TF >=2.8. To install TF 2.4, you need to downgrade the python version to <=3.8. Please follow this [link](https://www.tensorflow.org/install/pip#step-by-step_instructions) to install tensorflow in your system. –  Feb 20 '23 at 15:13

0 Answers0