title: I have installed Tensorflow but I can not import it in Python: ImportError: cannot import name 'descriptor' from 'google.protobuf' (unknown location)
body: <p>I have installed Tensorflow successfully in my Windows 10 Notebook:</p>
  
  <pre><code>(base) C:\WINDOWS\system32&gt;pip install tensorflow-gpu
  Requirement already satisfied: tensorflow-gpu in c:\users\alienware\anaconda3\lib\site-packages (2.0.0)
  Requirement already satisfied: gast==0.2.2 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (0.2.2)
  Requirement already satisfied: opt-einsum&gt;=2.3.2 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (3.1.0)
  Requirement already satisfied: numpy&lt;2.0,&gt;=1.16.0 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (1.16.5)
  Requirement already satisfied: keras-applications&gt;=1.0.8 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (1.0.8)
  Requirement already satisfied: keras-preprocessing&gt;=1.0.5 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (1.1.0)
  Requirement already satisfied: six&gt;=1.10.0 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (1.12.0)
  Requirement already satisfied: termcolor&gt;=1.1.0 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (1.1.0)
  Requirement already satisfied: tensorflow-estimator&lt;2.1.0,&gt;=2.0.0 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (2.0.0)
  Requirement already satisfied: grpcio&gt;=1.8.6 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (1.24.1)
  Requirement already satisfied: google-pasta&gt;=0.1.6 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (0.1.7)
  Requirement already satisfied: wheel&gt;=0.26 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (0.33.6)
  Requirement already satisfied: protobuf&gt;=3.6.1 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (3.10.0)
  Requirement already satisfied: wrapt&gt;=1.11.1 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (1.11.2)
  Requirement already satisfied: tensorboard&lt;2.1.0,&gt;=2.0.0 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (2.0.0)
  Requirement already satisfied: astor&gt;=0.6.0 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (0.8.0)
  Requirement already satisfied: absl-py&gt;=0.7.0 in c:\users\alienware\anaconda3\lib\site-packages (from tensorflow-gpu) (0.8.1)
  Requirement already satisfied: h5py in c:\users\alienware\anaconda3\lib\site-packages (from keras-applications&gt;=1.0.8-&gt;tensorflow-gpu) (2.10.0)
  Requirement already satisfied: setuptools in c:\users\alienware\anaconda3\lib\site-packages (from protobuf&gt;=3.6.1-&gt;tensorflow-gpu) (41.4.0)
  Requirement already satisfied: werkzeug&gt;=0.11.15 in c:\users\alienware\anaconda3\lib\site-packages (from tensorboard&lt;2.1.0,&gt;=2.0.0-&gt;tensorflow-gpu) (0.16.0)
  Requirement already satisfied: markdown&gt;=2.6.8 in c:\users\alienware\anaconda3\lib\site-packages (from tensorboard&lt;2.1.0,&gt;=2.0.0-&gt;tensorflow-gpu) (3.1.1)
  </code></pre>
  
  <p>However, when I try to import it in Python I get an error message:</p>
  
  <pre><code>C:\WINDOWS\system32&gt;conda activate base
  
  (base) C:\WINDOWS\system32&gt;python
  Python 3.7.4 (default, Aug  9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import tensorflow
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ModuleNotFoundError: No module named 'tensorflow'
  &gt;&gt;&gt;
  </code></pre>
  
  <p>When I run <code>conda list</code> I get:</p>
  
  <p><a href="https://i.stack.imgur.com/DGwai.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DGwai.png" alt="enter image description here"></a></p>
  
  <h2>Update</h2>
  
  <p>I followed Rachayita's advise below but I have installed Tensorflow 1.4 and I want tensorflow-gpu 2.0</p>
  
  <p>From my base Anaconda environment I uninstalled tensorflow-gpu 2.0 which was installed and then re-installed it with pip following the official tensorflow documentation.</p>
  
  <p>When I tried to import it in python I got the following error message:</p>
  
  <pre><code>(base) C:\Users\Alienware&gt;python
  Python 3.7.4 (default, Aug  9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import tensorflow
  2019-10-22 23:35:53.390099: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Users\Alienware\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 98, in &lt;module&gt;
      from tensorflow_core import *
    File "C:\Users\Alienware\Anaconda3\lib\site-packages\tensorflow_core\__init__.py", line 40, in &lt;module&gt;
      from tensorflow.python.tools import module_util as _module_util
    File "C:\Users\Alienware\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
      module = self._load()
    File "C:\Users\Alienware\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 44, in _load
      module = _importlib.import_module(self.__name__)
    File "C:\Users\Alienware\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "C:\Users\Alienware\Anaconda3\lib\site-packages\tensorflow_core\python\__init__.py", line 52, in &lt;module&gt;
      from tensorflow.core.framework.graph_pb2 import *
    File "C:\Users\Alienware\Anaconda3\lib\site-packages\tensorflow_core\core\framework\graph_pb2.py", line 7, in &lt;module&gt;
      from google.protobuf import descriptor as _descriptor
  ImportError: cannot import name 'descriptor' from 'google.protobuf' (unknown location)
  </code></pre>