简体   繁体   中英

How to resolve module not found error in JupyterNotebook for tensorflow?

I have created the tensorflow environment using the following set of commands:

conda create --name py3-TF2.0 python = 3

conda activate py3-TF2.0
conda install tensorflow
pip install -upgrade tensorflow
pip install ipykernel

在此处输入图像描述

Try these steps to install Tensorflow using Conda

#create virtual environmenttf2.0 using conda 
conda create --name tf2.0 python=3
#Activate the env
conda activate tf2.0
#Install Tensorflow
tf2.0$pip install tensorflow
tf2.0$python
#Verify the Tensorflow installation before launching any of the IDE
>>import tensorflow as tf
>>tf.__version__


#Launch the jupyter notebook
tf2.0$conda install jupyter
tf2.0$jupyter notebook

What you can do is run the jupyter notebook and try installing tensorflow from there.

In a jupyter notebook cell type in:

!pip install tensorflow==2.0.0

(dont miss the ! sign before)

To test:

import tensorflow as tf
tf.__version__

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM