AttributeError: 'NoneType' object has no attribute 'run_line_magic' showing pca program
我已经搜索了,但是什么也没得到。
import numpy, scipy, matplotlib.pyplot as plt, sklearn, urllib, IPython.display
from IPython import get_ipython
get_ipython().run_line_magic('matplotlib', 'inline')
显示的错误是
Traceback (most recent call last):
File "pca2.py", line 3, in <module>
get_ipython().run_line_magic('matplotlib', 'inline')
AttributeError: 'NoneType' object has no attribute 'run_line_magic'