[英]ModuleNotFoundError: No module named 'tensorflow' on Jupyter Notebook
when I try to import keras on a Jupyter notebook I receive this error message: ModuleNotFoundError: No module named 'tensorflow'.当我尝试在 Jupyter 笔记本上导入 keras 时,我收到此错误消息:ModuleNotFoundError:没有名为“tensorflow”的模块。
I need to use keras to build an LSTM model fora project and am a beginner in python so I don't know how to get around this error.我需要使用 keras 构建一个 LSTM model fora 项目并且是 python 的初学者所以我不知道如何解决这个错误。 I have tried to install tenserflow and keras into an environment on anaconda but I receive the same error.我试图将 tenserflow 和 keras 安装到 anaconda 上的环境中,但我收到了同样的错误。 For reference, I am using a Mac.作为参考,我使用的是 Mac。
My code:我的代码:
#Import libraries used
import math
import pandas as pd
import pandas_datareader.data as web
import datetime as dt
import numpy as np
from sklearn.preprocessing import MinMaxScaler
import matplotlib.pyplot as plt
from keras.models import Sequential
from keras.layers import Dense, LSTM
Any help would be greatly appreciated!任何帮助将不胜感激!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.