I use:
tensorflow 2.0.0-beta1
tflearn 0.3.2
I get: ModuleNotFoundError: No module named 'tensorflow.contrib'
Which recent version of tf/tflearn are compatible?
I reinstalled tensorflow and it somehow worked
pip install --upgrade --force-reinstall tensorflow
Related
I have tensorflow 1.9.0 and after successful installation of bert using !pip install bert-tensorflow, I cannot import bert in Jupyter notebook. I even ran !pip install bert-for-tf2. Still no success.
It turns out I did not have tensorflow in my environment. Fixed after installing tensorflow.
seems like "import tensorflow as tf" directly raise this error
Colab link:https://colab.research.google.com/drive/1Jr0j_I_npKQxcQ1ggJQFHTqoJHmt9Bqk
sorry, the problem is that installing tensorflow-gpu does not uninstall tensorflow and tensorflow 2.2.0 has introduced some changes that are incompatible with tensorflow 1.14.0.
if you do
%tensorflow_version 2.x
!pip uninstall -y tensorflow
!pip install tensorflow-gpu==1.14.0
it will work
from tensorflow.keras.preprocessing.text import Tokenizer
ImportError: No module named keras.preprocessing.text
Any solution?
thank you
my operating system: Ubuntu 19.10
Upgrade your keras package to latest version with command
pip install -U pip keras tensorflow
I'm using conda 4.4.9. I have already installed TensorFlow and I want to install Keras as well.
Then I tried to activate my virtual environment and install Keras as below:-
activate tensorflow_env_001
pip install --ignore-installed --upgrade keras
Then I got the following error message:
tensorflow 1.9.0 has requirement setuptools<=39.1.0, but you'll have setuptools 39.2.0 which is incompatible
That means my setuptools is too new. In fact, I can run the TensorFlow codes without any error. But I just can't install Keras. I tried to update setuptools but that had just made the situation worse, as setuptools now become 40.0.0.
If I run conda list, and I will see this:-
That means all TensorFlow, Keras and setuptools are here. But when I tried to import Keras in my Python code, I just got ModuleNotFoundError: No module named 'keras'.
How can I properly install Keras? Many thanks!!
tensorflow 1.9.0 has requirement setuptools<=39.1.0, but you'll have setuptools 39.2.0 which is incompatible
i got same error.To downgrade your setuptools version you can use
pip install setuptools==39.1.0
hope this helps further for keras installations.
Try to remove the env
conda remove --name ENVNAME --all
Then create a new one but first upgrade the pip version
python -m pip install --upgrade pip
and then install tensorflow:
pip install --ignore-installed --upgrade tensorflow==1.9.0
It will automatically get (downgrade) your version of setuptools
#
# Name Version Build Channel
.......
python 3.5.6 he025d50_0
setuptools 39.1.0 pypi_0 pypi
six 1.12.0 pypi_0 pypi
tensorboard 1.9.0 pypi_0 pypi
tensorflow 1.9.0 pypi_0 pypi
termcolor 1.1.0 pypi_0 pypi
.....
While installing tensorflow(CPU only) I am facing below error :
>>> import tensorflow as tf
Traceback (most recent call last): File "", line 1, in
ImportError: No module named 'tensorflow'
I have python version 3.5
Did you first try:
pip3 install --upgrade tensorflow
It's maybe due to some missing .py files. Download the package from Github link and paste it on python35/Lib/site-packages
import tensorflow as tf
invokes tensorflow not install it there is great article how to install on tensorflow website.
You have not mentioned platform/OS you working on also steps taken if any before trying this command.
best thing for beginners I feel is Anaconda which is suit of packages required for data science.
Give it a try.
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
You can search for the appropriate version you wish to install and update in the above mentioned url.
Try to install an old version of Tensorflow as:
pip install tensorflow==1.5.0
After installing the old version retry with the newest version, for example:
pip install tensorflow==1.9.0