Can't get Tensorflow 2.9 on Mac? - python

I'm trying to build a custom environment for a TF agent but for any modules that I need I get the error:
ImportError: This version of TensorFlow Probability requires TensorFlow version >= 2.9; Detected an installation of version 2.6.3. Please upgrade TensorFlow to proceed.
For !pip install tensorflow --upgradeI get:
Requirement already satisfied: tensorflow in ./opt/anaconda3/lib/python3.9/site-packages (2.6.5)
I also tried !pip install tensorflow-macos because it was suggested on pypi.org but then I get:
ERROR: Could not find a version that satisfies the requirement tensorflow-macos (from versions: none) ERROR: No matching distribution found for tensorflow-macos
If I try to specify 2.9 with !pip install 'tensorflow==2.9' --upgrade that does not work either:
ERROR: Could not find a version that satisfies the requirement tensorflow==2.9 (from versions: 2.5.0, 2.5.1, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3)
ERROR: No matching distribution found for tensorflow==2.9
I also tried all of these in my Mac terminal (with python -m pip...) as well as in VS code terminal but I really can't seem to get the Tensorflow version that I need for the agents and environments …

Ok so apparently, Tensorflow 2.9 is only available on macOSX 10.14 and onward ... yikes

Related

ERROR: No matching distribution found for transformers==4.20.1

I am trying to install this specific version of transformers but I get the error:
pip3 install transformers==4.20.1
ERROR: Could not find a version that satisfies the requirement transformers==4.20.1
from versions: 0.1, 2.0.0, 2.1.0, 2.1.1, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.4.0, 2.4.1,
2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.9.1, 2.10.0, 2.11.0, 3.0.0, 3.0.1, 3.0.2,
3.1.0, 3.2.0, 3.3.0, 3.3.1, 3.4.0, 3.5.0, 3.5.1, 4.0.0rc1, 4.0.0, 4.0.1, 4.1.0,
4.1.1, 4.2.0, 4.2.1, 4.2.2, 4.3.0rc1, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.4.0, 4.4.1,
4.4.2, 4.5.0, 4.5.1, 4.6.0, 4.6.1, 4.7.0, 4.8.0, 4.8.1, 4.8.2, 4.9.0, 4.9.1, 4.9.2,
4.10.0, 4.10.1, 4.10.2, 4.10.3, 4.11.0, 4.11.1, 4.11.2, 4.11.3, 4.12.0, 4.12.1,
4.12.2, 4.12.3, 4.12.4, 4.12.5, 4.13.0, 4.14.0, 4.14.1, 4.15.0, 4.16.0, 4.16.1,
4.16.2, 4.17.0, 4.18.0)
ERROR: No matching distribution found for transformers==4.20.1
I know the version exists since I have it installed on my local machine. I installing the package on an ubuntu remote machine. The Python version is 3.6.9. How can I get the version I need if it's saying that it doesn't even exist.
The 4.20.1 build does not support Python prior to 3.7. You'll either need to pick an earlier version or upgrade your Python.
You need Python >=3.7. You might also want to upgrade pip:
pip install --upgrade pip
https://pypi.org/project/transformers/4.20.0/

How to use FBProphet within Databricks?

I have tried installing the FBProphet within a Databricks notebook in the following ways:
dbutils.library.installPyPI('FBProphet', version='0.5')
pip install fbprophet
The first line of code has the error:
Py4JJavaError: An error occurred while calling o1552.addIsolatedPyPILibrary.
: org.apache.spark.SparkException: Process List(/local_disk0/pythonVirtualEnvDirs/virtualEnv-d8a840a2-8b99-410b-a9c8-0b04a40153ab/bin/python, /local_disk0/pythonVirtualEnvDirs/virtualEnv-d8a840a2-8b99-410b-a9c8-0b04a40153ab/bin/pip, install, FBProphet==0.5, --disable-pip-version-check) exited with code 1. ERROR: Could not find a version that satisfies the requirement httpstan<4.7,>=4.6 (from pystan>=2.14->FBProphet==0.5) (from versions: 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.5, 0.7.6, 0.8.0, 0.10.1, 1.0.0, 1.1.0, 1.1.1, 1.1.2, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.1.0, 2.2.0, 2.3.0, 4.0.0, 4.1.0, 4.2.1, 4.3.0, 4.3.1, 4.3.2, 4.4.0, 4.4.1, 4.4.2)
ERROR: No matching distribution found for httpstan<4.7,>=4.6 (from pystan>=2.14->FBProphet==0.5)
And the second line has the error:
com.databricks.backend.daemon.driver.conda.NotebookEnvironmentException: Notebook environment commands (eg %pip) cannot be used in the same notebook as dbutils.library commands. Please ensure your notebook only uses one of these two types of commands, then detach and re-attach the notebook to run this command.
You shouldn't use the first one because from the error:
"dbutils.library APIs are deprecated and will be removed in a future
DBR release. You can use %pip commands to install notebook-scoped
python libraries."
And for the second one, according to the installations instructions on official documentation,
As of v1.0, the package name on PyPI is “prophet”; prior to v1.0 it
was “fbprophet”
So, you should use pip install prophet instead of pip install fbprophet

No module named 'tensorflow.contrib' when importing A2C from stable_baselines

I'm trying to import A2C from stable_baselines using the following code line:
from stable_baselines import A2C
But I get the following error:
ModuleNotFoundError: No module named 'tensorflow.contrib'
I tried installing an old version of Tensorflow using the following command:
pip install tensorflow==1.15.0
But I get the following error:
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement tensorflow==1.15.0 (from versions: 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1)
ERROR: No matching distribution found for tensorflow==1.15.0
I tried installing Tensorflow 1.15.0 using the .whl file:
pip install tensorflow-1.15.0-cp37-cp37m-manylinux2010_x86_64.whl
But I also get an error:
Defaulting to user installation because normal site-packages is not writeable
ERROR: tensorflow-1.15.0-cp37-cp37m-manylinux2010_x86_64.whl is not a supported wheel on this platform.
I tried upgrading pip and uninstalling Tensorflow but I still get the same errors.
How can I deal with this problem?
'tensorflow.contrib' is no longer supported and deprecated to use in Tensorflow 2.x and Stable-Baselines also supports only Tensorflow versions 1.x.
To avoid this error ModuleNotFoundError: No module named 'tensorflow.contrib', you need to install Tensorflow 1.x using the below code if you have python 3.5 to 3.7 installed in your system.
!pip install tensorflow==1.15
!pip install stable_baselines
from stable_baselines import A2C
or you can try by coverting the runtime to Tensorflow 1.x before executing stable_baselines code:
%tensorflow_version 1.x
However, Tensorflow 1 is deprecated, and support will be removed on August 1, 2022. So It is suggested to use stable_baselines3 in the place of stable_baselines in Tensorflow 2.x.
!pip install stable_baselines3
from stable_baselines3 import A2C

Want to install tensorflow on python version- 3.7.6

I am trying to install tensorflow, but encountered errors like -
Could not find a version that satisfies the requirement tensorflow (from version: none)
No matching distribution found for tensorflow.
My installations are as follows :
Python version= (3.7.6)
Anaconda version =(1.7.2)

ERROR: Could not find a version that satisfies the requirement tensorflow==1.2.1 ? pip cannot find tensroflow 1 versions

I cannot install any tensorflow 1 version in my virtual env.. it is required by a project that I'm trying to run..
pip install tensorflow==1.2.1
ERROR: Could not find a version that satisfies the requirement tensorflow==1.2.1 (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==1.2.1
Tried things suggested here :
Tensorflow r1.0 : could not a find a version that satisfies the requirement tensorflow
my python version is not old : 3.8.5
my pip version is OK : 20.0.2
i still CANNOT install tensorflow 1.2.1 ...
what i gotta do.. I am using ubuntu 20
From https://www.tensorflow.org/install/pip:
System requirements:
Python 3.5–3.8
Python 3.8 support requires TensorFlow 2.2 or later.
There are two options:
Use older version of python (3.5-3.7)
Use TensorFlow 2.2 or later

Categories