简体   繁体   中英

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

I have setup Tensorflow and Keras on Mac OS. I also have Jupyter that came as part of my Anaconda installation.

When I try to import Tensoflow or Keras in a Jupyter notebook, I get "a no module named <...>" error.

Am I missing a step ?

Change your environments. You probably installed everything inside a tensorflow environment, but ran the notebook on the root one.

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. Instead, try the steps below:

  1. In command prompt navigate to the “site packages” directory of your anaconda installed.
  2. Now use conda install tensorflow and after conda install keras
  3. Restart your Jupyter notebook and run the packages.

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