Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/306.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
%python 3.6.2中的matplotlib内联错误_Python_Matplotlib_Jupyter Notebook_Jupyter - Fatal编程技术网

%python 3.6.2中的matplotlib内联错误

%python 3.6.2中的matplotlib内联错误,python,matplotlib,jupyter-notebook,jupyter,Python,Matplotlib,Jupyter Notebook,Jupyter,如何在我的计算机上运行代码 我试图在我的计算机上运行我的代码,但不知怎的出现了一个错误: 文件“catcode.py”,第9行 我使用的是macOS Sierra 10.12.6、MacBook Pro(视网膜,13英寸,2015年初)、2.9 GHz Intel Core i5、8 GB 1867 MHz DDR3、Intel Iris Graphics 6100 1536 MB 我还通过终端使用了python3: Python 3.6.2 (v3.6.2:5fd33b5926, Jul

如何在我的计算机上运行代码


我试图在我的计算机上运行我的代码,但不知怎的出现了一个错误:

文件“catcode.py”,第9行


我使用的是
macOS Sierra 10.12.6
、MacBook Pro(视网膜,13英寸,2015年初)、2.9 GHz Intel Core i5、8 GB 1867 MHz DDR3、Intel Iris Graphics 6100 1536 MB

我还通过终端使用了
python3

Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)
[GCC 4.2.1(苹果公司建造5666)(dot 3)]关于达尔文

这是我拥有的软件包列表:


1.1.2、h5py=2.7.1 1、4.2.1.1、4.2.1.1、5.py=2.7.1、ipython=2.7.1、ipython膝1=0.2.0、ipython=0.2.0、1.1.1.1.1.1.1、1.1.1.1、2.1、1.1.2.1、2.2.1、2.2.1、2.2.1、2.2.1、2.2.1、2.2.1、2.2.1、2.2.1、IPyt至于至于至于至于至于IPyt至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于至于6.6。1、pytz==2017.2、scikit learn==0.19.0、scipy==0.19.1、setuptools==28.8.0、simplegeneric==0.8.1、six==1.11.0、traitlets==4.3.2、wcwidth==0.1.7']

%matplotlib inline
是一种装饰Jupyter笔记本中单元格的“神奇功能”

您不能在
jupyter笔记本
ipython控制台

对您来说,最好的解决方案可能是注释掉这行代码;除此之外,您可以安装jupyter和ipython。

'exec(%matplotlib inline)
应该可以正常工作。我已经在我的系统上对它进行了测试,它可以与python3.6一起正常工作

Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)