【发布时间】:2017-10-30 01:51:14
【问题描述】:
如何在我的电脑上运行代码?
我试图在我的计算机上运行我的代码,但不知何故得到了错误:
文件“catcode.py”,第 9 行
%matplotlib inline
^
SyntaxError: invalid syntax
我使用的是macOS Sierra 10.12.6,MacBook Pro(Retina,13 英寸,2015 年初),2.9 GHz Intel Core i5,8 GB 1867 MHz DDR3,Intel Iris Graphics 6100 1536 MB。
我也在通过终端使用python 3:
Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] 在 darwin 上
这是我拥有的软件包列表:
['appnope==0.1.0', 'cycler==0.10.0', 'decorator==4.1.2', 'h5py==2.7.1', 'ipython-genutils==0.2.0' , 'ipython==6.2.1', 'jedi==0.11.0', 'matplotlib==2.1.0', 'numpy==1.13.3', 'parso==0.1.0', 'pexpect== 4.2.1'、'pickleshare==0.7.4'、'pip==9.0.1'、'prompt-toolkit==1.0.15'、'ptyprocess==0.5.2'、'pygments==2.2.0 ', 'pyparsing==2.2.0', 'python-dateutil==2.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']
【问题讨论】:
标签: python matplotlib jupyter-notebook jupyter