使用命令行编程无论视觉效果还是代码录入的用户体验都不太好,
因此后期准备使用jupyter来编写代码。
然而,报错了。

使用import tensorflow as tf加载tensorflow报错。
因为此电脑上原本的jupyter并不在tensorflow环境下面载入的,因此不能加载tensorflow。
解决方案:在tensorflow环境下重新安装jupyter。
命令行代码:
activate tensorflow
conda install ipython
conda install jupyter
重新运行
jupyter notebook
【采坑】:ipython和jupyter依然无法安装。提示:

You will need to adjust your conda configuration to proceed.
Use conda config --show channels to view your configuration’s current state.
Further configuration help can be found at https://conda.io/docs/config.html 5.
此时:
1、
查看当前环境下已有的channel。
2、
将已有的channel删掉。
3、依次输入,重装ipython和jupyter。
conda install ipython
conda install jupyter
4、重新运行jupyter,选择这一项便不再报错了。

tensorflow载入成功,后边便可以在jupyter编写关于深度学习的python代码了~~~【oh yearh~】

本文介绍了在TensorFlow环境下安装Jupyter Notebook遇到的问题及解决方法。当尝试`import tensorflow as tf`时,由于原本的Jupyter不在TensorFlow环境中,导致报错。解决方案是激活TensorFlow环境,然后使用conda安装ipython和jupyter。但安装过程中可能遇到conda配置问题,需要查看并调整channel,删除现有channel后重新安装ipython和jupyter。完成这些步骤后,就能在Jupyter中顺利使用TensorFlow进行深度学习开发。
2534

被折叠的 条评论
为什么被折叠?



