1. Background
First of all, my environment:
os : windows10
anaconda版本:2.7
The official website provides two ways to install TensorFlow: PIP and anaconda. I use the anaconda method. After the installation is completed, you can import TensorFlow or run the program on the command line. Then I use the command Jupiter notebook
to start Jupiter notebook in the created environment named TensorFlow. However, there is only python2 in the options of Jupiter notebook, and there is no newly installed environment, As shown in the following figure:
and when Import tensorflow as TF
is executed, an error will occur: no module named TensorFlow
2. Solutions
Enter the anaconda command line, and then select TensorFlow environment:
> activate tensorflow
Execute the following command:
> conda install nb_conda
After the installation, start jupyter Notebook:
> jupyter notebook
At this time, you can see that the options for creating a file include our established environment TensorFlow
.
If you select TensorFlow environment and then Import tensorflow as TF
, no error will occur
Similar Posts:
- jupyter notebook error: No module named ‘tensorflow’
- Modify the default open file path of Jupiter notebook
- Using the jupyter notebook (error/usr/bin/python3: no module named ipykernel) on the local browser remote server_ launcher)
- Error reporting of importing tensorflow package from pycharm
- Problem solving of jupyter notebook dead kernel
- How to Solve Anaconda Error (Three Errors to Solve)
- [Solved] Jupiter notebook failed to start Error: DLL load failed
- [Solved] Exception: Jupyter command `jupyter-notbook` not found.
- [Solved] ImportError: cannot import name pywrap_tensorflow
- Anaconda conda activate Envirnment: Your shell has not been properly configured to use ‘conda activate’.