Mac M1 - tensorflow-dependent package installation not working - tensorflow

I am using a MacBook Pro M1 and try to install the package dmol-book, which has tensorflow-dependency, via pip3 install dmol-book==1.3.2 .
It throws the following error:
ERROR: Ignored the following versions that require a different python version: 1.0.1 Requires-Python >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3,!=3.4.*,<3.9; 1.1.0 Requires-Python >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<3.9; 1.1.1 Requires-Python >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<3.9
ERROR: Could not find a version that satisfies the requirement tensorflow>=2.7 (from dmol-book) (from versions: none)
ERROR: No matching distribution found for tensorflow>=2.7
I have installed tensorflow via
pip3 install tensorflow-macos
pip3 install tensorflow-metal
I can use tensorflow within python3:
>>> import tensorflow
>>> tensorflow.__version__
'2.11.0'
>>> tensorflow.__file__
'/Users/username/.pyenv/versions/3.10.7/envs/venv/lib/python3.10/site-packages/tensorflow/__init__.py'
but pip3 list does not list tensorflow, only
tensorboard 2.11.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.1
tensorboardX 2.5.1
tensorflow-estimator 2.11.0
tensorflow-macos 2.11.0
tensorflow-metal 0.7.0
tensorstore 0.1.28
tensorflow also shows up as a directory in the original virtual environment directory, that I created:
/Users/username/pathtovirtualenv/venv/lib/python3.10/site-packages/tensorflow
Can someone help me to resolve this issue?
Thanks in advance!

I think its because it does not find a version that satisfies the requirement as mentioned.

Related

tensorflow-data-validation cannot be pip installed

Since I'm moving away from pandas DataFrames to TensorFlow datasets, I'd like to use tensorflow-data-validation instead of the more traditional pandas-profiling when it comes to data exploration and validation.
However, pip install tensorflow-data-validation gives the following error:
ERROR: Could not find a version that satisfies the requirement tensorflow-data-validation (from versions: none)
ERROR: No matching distribution found for tensorflow-data-validation
What could be the problem? This old GitHub issue explains how this could be due to the Python version, but Apache Beam (on which tensorflow-data-validation presumably relies) is now fully compatible with Python 3, so it must be something else.
My environment is as follows:
Python 3.9.2
TensorFlow 2.6.0
Debian GNU/Linux 11 (bullseye)
pip 21.3
I got the same error when using Python 3.9. After downgrading to Python 3.8, pip install tensorflow-data-validation ran successfully.
Regarding your comment about Apache Beam, it looks like the Python SDK currently supports Python 3.8 (and earlier) but not yet Python 3.9.
My environment:
Python 3.8.10
TensorFlow 2.8.0
macOS Monterey (12.0.1)
pip 21.1.1
Try this
pip install --upgrade --force-reinstall tensorflow-data-validation[all]
It might be a version compatibility issue with tensorflow==2.6.0.
Try
pip install tensorflow-data-validation==1.3.0
I was able to install the tensorflow_data_validation library successfully, via the below command in my Google Colab file.
!pip install -U tensorflow \
tensorflow-data-validation \
apache-beam[gcp]

Not able to install the latest termcolor version

I am trying to install termcolor version 1.1.0, so that i can further install Tensorflow, as there's a dependency, but unable to install the latest termcolor.
ERROR: Could not find a version that satisfies the requirement termcolor==1.1.0
ERROR: No matching distribution found for termcolor==1.1.0
Currently, my termcolor version is 0.2
I tried several ways like --upgrade, but no luck..
Please help.
You can install termcolor using below code, it will install the latest version of termcolor which is 1.1.0.:
!pip install termcolor
However, If you install TensorFlow using pip, it will automatically install some required package along with TensorFlow which also includes termcolor module.
!pip install tensorflow

downgrading tensorflow to v=2.1.0

I'm trying to use keras-tcn:
https://github.com/philipperemy/keras-tcn
But it seems that there is some conflict.
Installing it is downgrading keras from 2.4.3 to 2.3.1. But keras 2.3.1 seems to need tensorflow 2.1.0.
Yet by trying to install tensorflow:
pip install tensorflow == 2.1.0, I do have this error message:
ERROR: Could not find a version that satisfies the requirement tensorflow==2.1.0 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3)
ERROR: No matching distribution found for tensorflow==2.1.0
Does anyone have some solutions for installing it ?
Here are some infos that might be useful
pip : 20.2.4
python : 3.8.5
Downgrade your python to 3.7 and install tensorflow 2.1

How to downgrade tensorflow 2.0.1 to 0.9.0? in Mac OS

$ pip install tensorflow==0.9.0
ERROR: Could not find a version that satisfies the requirement tensorflow==0.9.0 (from versions: 2.0.1)
ERROR: No matching distribution found for tensorflow==0.9.0
I don't know the reason...
I would suggest you to create a virtual environment and then fresh install TF using pip install "tensorflow==0.9.0"

Installation Error:Collecting tensorflow ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)

Error raised when installing tensorflow using pip
C:\Users\Lenovo>python --version
Python 3.6.0
C:\Users\Lenovo>pip --version
pip 19.1.1 from c:\users\lenovo\appdata\local\programs\python\python36-32\lib\site-packages\pip (python 3.6)
C:\Users\Lenovo>pip install tensorflow
Collecting tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
You can use Python3.5.2 to install Tensorflow, but notice that it can not be installed on your environment and you should use base interpreter to install it then you can make your environment and inherit form the basic interpreter and use it in your environment.