Python problem with libraries. I got some error - python

I was trying to download imageai using pip module and I got following error:
ERROR: tensorflow-intel 2.11.0 has requirement keras<2.12,>=2.11.0, but you'll have keras 2.4.3 which is incompatible.
ERROR: tensorflow-intel 2.11.0 has requirement numpy>=1.20, but you'll have numpy 1.19.3 which is incompatible.
I don't know what to do. Please help.

The error message you are seeing indicates that the current version of TensorFlow that you have installed (tensorflow-intel 2.11.0) requires different versions of Keras and Numpy than the versions that are currently installed on your system. Specifically, tensorflow-intel 2.11.0 requires Keras version less than 2.12 but you have version 2.4.3 installed, and it also requires Numpy version greater than or equal to 1.20, but you have version 1.19.3 installed.
You could try upgrading Keras and Numpy to meet these requirements:
pip install keras==2.11.0
pip install numpy>=1.20

Related

Can't install tensorflow on ubuntu 20.04.3 Python 3.6.15 pip 21.2.4

I have been around the mulberry bush for a few days trying to get tensorflow installed on an Ubuntu system. My specifications are;
Ubuntu: 20.04.3
Python (virtual environment): 3.6.15
Pip: 21.2.4
Tensorflow version wanted: 1.13.1
Tensorflow version will take: anything at this point
I followed a number of answers on the web. Got a compatible version of Python. Got the latest pip....
When I use the command;
pip3 install tensorflow==1.13.1
I get;
ERROR: Could not find a version that satisfies the requirement tensorflow==1.13.1 (from versions: none)
ERROR: No matching distribution found for tensorflow==1.13.1
when I do a pip_search on tensorflow, it shows tensorflow 2.6.0.
But when I do;
pip3 install tensorflow==2.6.0
I get the same error.
when I use the --upgrade switch to pip, I get the same error. I tried to install from a wheel file, but the file was incompatible on my system.
Any help is appreciated.
As per documentation of Tensorflow, version 1's final release that can be downloaded/installed is 1.15. Below this version are deprecated and no longer available to use in development.
Read it about here

Tensorflow - install version 2.3.0

I'm currently running Tensorflow version 2.5.0 but I need to lower my version to 2.3.0.
I tried to install Tensorflow version 2.3.0 but I get this error:
ERROR: Could not find a version that satisfies the requirement tensorflow==2.3.0 (from versions: 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.6.0rc0, 2.6.0rc1)
ERROR: No matching distribution found for tensorflow==2.3.0
I know its possible to build the pip package from the source code, but I was wondring if there is a better soultion.
Tensorflow 2.3.0 requires (and provides wheels for) Python 3.5, 3.6, 3.7, 3.8 but not 3.9 (and no source code). Downgrade Python to 3.8 or use a higher version of TF. Support for Python 3.9 started at version 2.5.0.

Implementing model from repo error: truth value of an array with more than one element is ambiguous

I'm trying to reproduce the results from the Graph-RCNN model here and am running into an error when I try to train it. I know about the error "truth value of an array with more than one element is ambiguous", but I don't know when you can have syntax like that without throwing the error. Is a solution downgrading my version of Numpy? Generally, is there a likely package incompatibility error I should check first? Are there older versions of Numpy or h5py that don't throw this error. I just followed the instructions on the environment setup within the repo and installed everything using Conda. This is all in python 3.6.2 in a Conda environment
Notable package versions:
cython 0.29.23 py36h2531618_0
h5py 2.8.0 py36h3010b51_1003 conda-forge
mkl 2020.4 h726a3e6_304 conda-forge
numpy 1.19.2 py36h54aff64_0
numpy-base 1.19.2 py36hfa32c7d_0
pycocotools 2.0.2 py36h8c4c3a4_1 conda-forge
pytorch 1.0.0 py3.6_cuda9.0.176_cudnn7.4.1_1 pytorch
scipy 1.4.1 py36h2d22cac_3 conda-forge
torchvision 0.2.1 py_2 pytorch

Tensorflow Federated tutorial in Google Colab giving errors in the initialization code snippet

Here is the cell that needs to be run before starting the tutorial.
##test {"skip": true}
# tensorflow_federated_nightly also bring in tf_nightly, which
# can causes a duplicate tensorboard install, leading to errors.
!pip uninstall --yes tensorboard tb-nightly
!pip install --quiet --upgrade tensorflow_federated_nightly
!pip install --quiet --upgrade nest_asyncio
!pip install --quiet tb-nightly # or tensorboard, but not both
import nest_asyncio
nest_asyncio.apply()
It is giving out following errors:
ERROR: tensorflow 2.4.1 requires tensorboard~=2.4, which is not installed.
ERROR: tensorflow 2.4.1 has requirement gast==0.3.3, but you'll have gast 0.4.0 which is incompatible.
ERROR: tensorflow 2.4.1 has requirement grpcio~=1.32.0, but you'll have grpcio 1.34.1 which is incompatible.
ERROR: tensorflow 2.4.1 has requirement h5py~=2.10.0, but you'll have h5py 3.1.0 which is incompatible.
ERROR: datascience 0.10.6 has requirement folium==0.2.1, but you'll have folium 0.8.3 which is incompatible.
Need help resolving this. I am not much familiar with libraries and classes on Tensorflow.
Even though the console says there was an error, the pip packages should have been installed correctly.
This happens because the notebooks use tensorflow-federated-nightly, which depends on an installs tf-nightly overwriting the base tensorflow install. However pip still thinks the TFF dependencies will conflict with the now overwritten TensorFlow core package.
Adding tensorflow to the !pip uninstall list may make this error go away, but the functionality of the notebook won't change.
You can import tensorflow federated like the following. It solved my error. I tried to follow Federated Learning for Image Classification and while I was trying to import tensorflow_federated it was always giving me error.
from tensorflow_federated import python as tff

Anaconda3, Python 3.6 - pip install imagenet_utils - error message: Could not find a version that satisfies the requirement imagenet_utils

Anaconda3, Python 3.6, pip version 9.0.1
pip install imagenet_utils
Error message:
Could not find a version that satisfies the requirement imagenet_utils (from versions: ) No matching distribution found for imagenet_utils
Please, help.
Read me docs on github indicate compatibility up to 3.5. Take a look at some comparable libraries to avoid this issue here:
5 Genius Python Deep Learning Libraries.
Anaconda also offers a conda install version of Keras where this specific package can be accessed:
conda install -c conda-forge keras
then for python script would read:
from keras import imagenet_utils
Assuming compatibility is not the issue, you will need to verify the anaconda package location and make sure that you are installing to that location.

Categories

Resources