In anaconda prompt I was able to import tensorflow, but I can't import tensorflow in jupyterlab.
I downloaded anaconda today and opened anaconda prompt. Then I did
python -m pip install --upgrade pip
.
conda create -n tensorflow python=3.6
.
activate tensorflow
.
pip install tensorflow
.
python
.
import tensorflow as tf
.
tf.__version__
and in the process there wasn't any error.
So I opend up jupyterlab and wrote
import tensorflow as tf
but it didn't work.
In anaconda prompt I was able to import tensorflow like the code below.
(base) C:\Users\SuperNoteJ>activate tensorflow
(tensorflow) C:\Users\SuperNoteJ>python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 18:50:55) [MSC v.1915 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> tf.__version__
'1.12.0'
>>>
But when I opened anaconda navigator and launched jupyterlab(using base) I can't import tensorflow. The below code is the error code on jupyterlab.
import tensorflow as tf
-----------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-64156d691fe5> in <module>
----> 1 import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'