[IPython-dev] how to upgrade iPython on AWS ec2? ERROR: Line magic function `%matplotlib` not found.

Thomas Kluyver takowl at gmail.com
Thu Sep 25 20:48:23 EDT 2014


Hi Andy,

You should be able to upgrade to IPython 1.2.1 on Python 2.6, and I believe
that has the %matplotlib magic.

Red hat is a very conservative Linux distro, which is why it still offers
Python 2.6. If that's not what you want, I'd use the Ubuntu LTS images,
which will definitely have Python 2.7.

Thomas

On 25 September 2014 17:04, Andy Davidson <Andy at santacruzintegration.com>
wrote:

> Hi
>
> I am new to AWS.amazon and ec2. When I run my iPython notebook I get the
> error
>
> ERROR: Line magic function `%matplotlib` not found.
>
> import IPython
> print IPython.sys_info()
>
> {'commit_hash': '858d539',
>  'commit_source': 'installation',
>  'default_encoding': 'UTF-8',
>  'ipython_path': '/usr/lib/python2.6/site-packages/ipython-0.13.2-py2.6.egg/IPython',
>  'ipython_version': '0.13.2',
>  'os_name': 'posix',
>  'platform': 'Linux-3.4.37-40.44.amzn1.x86_64-x86_64-with-glibc2.2.5',
>  'sys_executable': '/usr/bin/python2.6',
>  'sys_platform': 'linux2',
>  'sys_version': '2.6.8 (unknown, Mar 14 2013, 09:31:22) \n[GCC 4.6.2 20111027 (Red Hat 4.6.2-2)]'}
>
> This notebook works fine on my mac
>
> {'commit_hash': '681fd77',
>  'commit_source': 'installation',
>  'default_encoding': 'UTF-8',
>  'ipython_path': '/Library/Python/2.7/site-packages/IPython',
>  'ipython_version': '2.1.0',
>  'os_name': 'posix',
>  'platform': 'Darwin-13.3.0-x86_64-i386-64bit',
>  'sys_executable': '/usr/bin/python',
>  'sys_platform': 'darwin',
>  'sys_version': '2.7.5 (default, Mar  9 2014, 22:15:05) \n[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]’}
>
>
> I am new to red hat. Any idea how you upgrade to version 2.1.0 ?
>
>
> I found a link that suggested I do the following
>
> yum -y install python-pip
>
>
> # I have not idea what version I am going to wind up with I to use the
> same version as my mac ‘2.1.0'
>
> pip install --upgrade ipython
>
>
> This failed because my python version was 2.6 and it needs to be at least
> 2.7
>
>
> I found this link how ever I find it hard to believe I have to down load the source for python first and compile it
>
> http://stackoverflow.com/questions/6630873/how-to-download-python-from-command-line
>
>
>
>
> Any suggestions?
>
>
> Thanks
>
>
> Andy
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140925/46aba1b8/attachment.html>


More information about the IPython-dev mailing list