Tensorflow import error: No module named 'tensorflow'
The reason Python 3.5 environment is unable to import Tensorflow is that Anaconda does not store the tensorflow package in the same environment.
One solution is to create a new separate environment in Anaconda dedicated to TensorFlow with its own Spyder
conda create -n newenvt anaconda python=3.5
activate newenvt
and then install tensorflow into newenvt
I found this primer helpful
No module named 'tensorflow.compat'
This just happened to me but I figured it out. Your .py script filename is the same with one of the files of the tensorflow library. You can just rename your python script and it will work fine.
ImportError: No module named tensorflow.keras.applications
tryfrom tensorflow.keras.applications import resnet
or try downgrading to tensorflow 2.7
!pip uninstall tensorflow
!pip install tensorflow==2.7
ModuleNotFoundError: No module named 'tensorflow'
The problem was solved by me(after a whole week). The solution was to downgrade python from 3.5.6 to 3.5.4. Not clear why such a minor difference caused such problems! :) Hope it helps someone else too....
Related Topics
Installing Numpy and Scipy on 64-Bit Windows (With Pip)
How to Return a Subset of a List That Matches a Condition
Gunicorn Autoreload on Source Change
How to Draw a Line with Matplotlib
Read Unicode Characters from Command-Line Arguments in Python 2.X on Windows
Using Monotonically_Increasing_Id() for Assigning Row Number to Pyspark Dataframe
Writing to a File in a for Loop Only Writes the Last Value
Why Does CSVwriter.Writerow() Put a Comma After Each Character
Pandas Style Function to Highlight Specific Columns
Checking Odd/Even Numbers and Changing Outputs on Number Size
Loop Over a List Containing Path to Sound Files
How to Include a Python Package with Hadoop Streaming Job
Replace Negative Values in an Numpy Array
Populate a Pandas Sparsedataframe from a Scipy Sparse Matrix
Python - When to Use File VS Open
Python Parse Comma-Separated Number into Int