小编Pra*_*bre的帖子

python SyntaxError:无效语法%matplotlib inline

我的python脚本中出现此错误:

%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt

from utils import progress_bar_downloader
import os
#Hosting files on my dropbox since downloading from google code is painful
#Original project hosting is here: https://code.google.com/p/hmm-speech-recognition/downloads/list
#Audio is included in the zip file
link = 'https://dl.dropboxusercontent.com/u/15378192/audio.tar.gz'
dlname = 'audio.tar.gz'

if not os.path.exists('./%s' % dlname):
    progress_bar_downloader(link, dlname)
    os.system('tar xzf %s' % dlname)
else:
    print('%s already downloaded!' % dlname)
Run Code Online (Sandbox Code Playgroud)

我想使用matplotlib,但它给出了语法错误,我试过sudo apt-get install python-matplotlib

python matplotlib

7
推荐指数
2
解决办法
2万
查看次数

标签 统计

matplotlib ×1

python ×1