title: %matplotlib inline error in python 3.6.2
body: <p>How to run a code on my computer?</p>
  
  <hr>
  
  <p>I am trying to run my code on my computer, but somehow get an error:</p>
  
  <p>File "catcode.py", line 9</p>
  
  <pre><code>%matplotlib inline
  
  ^
  
  SyntaxError: invalid syntax
  </code></pre>
  
  <hr>
  
  <p>I am using <code>macOS Sierra 10.12.6</code>, MacBook Pro (Retina, 13-inch, Early 2015), 2.9 GHz Intel Core i5, 8 GB 1867 MHz DDR3, Intel Iris Graphics 6100 1536 MB.</p>
  
  <p>I am also using <code>python 3</code> through terminal:</p>
  
  <pre><code>Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)
  </code></pre>
  
  <p>[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin</p>
  
  <p>This is the list of packages I have:</p>
  
  <p>['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']</p>