简体   繁体   English

即使已安装TensorFlow和Keras,也可以在Jupyter中导入它们吗?

[英]Can import TensorFlow and Keras in Jupyter, even though I have them installed?

I have setup Tensorflow and Keras on Mac OS. 我已经在Mac OS上安装了Tensorflow和Keras。 I also have Jupyter that came as part of my Anaconda installation. 我的Anaconda安装中还包含Jupyter。

When I try to import Tensoflow or Keras in a Jupyter notebook, I get "a no module named <...>" error. 当我尝试在Jupyter笔记本中导入Tensoflow或Keras时,出现“没有名为<...>的模块”错误。

Am I missing a step ? 我错过了一步吗?

Change your environments. 改变您的环境。 You probably installed everything inside a tensorflow environment, but ran the notebook on the root one. 您可能将所有内容都安装在tensorflow环境中,但在根目录上运行了笔记本。

The window you want to check 您要检查的窗口

If you are a Windows/Mac user who is working on Jupyter notebook, pip install keras doesn't help you. 如果您是使用Jupyter笔记本电脑的Windows / Mac用户,则pip install keras对您没有帮助。 Instead, try the steps below: 相反,请尝试以下步骤:

  1. In command prompt navigate to the “site packages” directory of your anaconda installed. 在命令提示符下,导航到已安装的anaconda的“站点软件包”目录。
  2. Now use conda install tensorflow and after conda install keras 现在使用conda install tensorflow并在conda install tensorflow conda install keras
  3. Restart your Jupyter notebook and run the packages. 重新启动Jupyter笔记本并运行软件包。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 即使安装了 tensorflow 和 keras,Python 也不会让我导入 tensorflow.keras? - Python won't let me import tensorflow.keras even though tensorflow and keras are both installed? 即使正确安装,也无法在 Jupyter notebook 中导入 pygame - Can not import pygame in Jupyter notebook even though it is installed correctly 即使已经安装,也无法在 Jupyter 中导入 statsmodels? - Can't import statsmodels in Jupyter even though it is already installed? 即使我安装了库,也无法导入 python 中的库 - Unable to import libraries in python even though i have the libraries installed 从终端运行脚本时无法导入 tensorflow,即使 tensorflow 在 jupyter 笔记本和终端中工作 - Can't import tensorflow when run script from terminal, even though tensorflow works in jupyter notebook and terminal 即使安装了 pygame 也无法导入 - Can't import pygame even though it is installed 即使安装了 PySerial 也无法导入 - Can not import PySerial even though it's installed 我已经在Windows中安装了TensorFlow,但是当我尝试将其导入Jupyter Notebook时出现错误 - I have installed TensorFlow in my Windows but I get an Error when I try to import it in my Jupyter Notebook 无法在虚拟环境中导入&#39;flask_wtf&#39;和&#39;wtforms&#39;,即使我已经安装了它们? - Unable to import 'flask_wtf' & 'wtforms' in a virtual env even though I've already pip installed them? 我是否成功安装了 TensorFlow 和 Keras? - Have I successfully installed TensorFlow and Keras?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM