下面的python代码有错误。我在逃避剧本。我使用的是Python2.7.12。import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from IPython import get_ipython
ipython_shell = get_ipython()
get_ipython().run_line_magic('matplotlib', 'inline')
我试过同时使用py和jpy扩展。试图更改导入matplotlib的语法,但没有任何工作。
使用python运行时出现的错误显示Traceback (most recent call last):
File "LR.jpy", line 7, in
get_ipython().run_line_magic('matplotlib', 'inline')
AttributeError: 'NoneType' object has no attribute 'run_line_magic'
运行iPython时出错---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
C:\Users\Roland\Google Drive\Work\Machine Learning\machine-learning-ex1\ex1\LR.jpy in ()
5 from IPython import get_ipython
6 ipython_shell