2017-08-30 1 views
0

Il génère une erreur {{matplotlib.pyplot d'importation comme plt ModuleNotFoundError: Aucun module nommé 'matplotlib'}}Ce code fonctionne parfaitement en jupyter mais pas en python 3.6

import datetime as dt 
import matplotlib.pyplot as plt 
from matplotlib import style 
import pandas as pd 
import pandas_datareader.data as web 
style.use('ggplot') 
start = dt.datetime(2000, 1, 1) 
end = dt.datetime(2016, 12, 31) 
df = web.DataReader('TSLA', "yahoo", start, end) 
print(df.head()) 

Répondre

0

Vous devez installer matplotlib module, faire:

$pip3 install matplotlib