使用命令行编程无论视觉效果还是代码录入的用户体验都不太好,
因此后期准备使用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 configuratio

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





