[Numpy-discussion] numpy and readline installation fails

Ralf Gommers ralf.gommers@googlemail....
Wed Jul 4 11:44:46 CDT 2012


On Wed, Jul 4, 2012 at 6:24 PM, Aron Ahmadia <aron@ahmadia.net> wrote:

> How do the .dmg files work?  Are these binary installers into the system
> Python?  I would expect that these wouldn't work with a manually installed
> Python from python.org, but I have no experience with them.
>

They're binary installers for the python.org Python. So they install into
/Library/Frameworks/Python.framework/. They don't work with the system
(Apple) Python; I think leaving that alone and installing from
python.orgis in general good advice.


>
> Tom, I have had very good luck with the brew Python 2.7 installer, which
> will give you a /usr/local Python base install and easy_install.  Brew can
> also install readline correctly for you.
>
> https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python
>
> Homebrew appears to be better than MacPorts/Fink, but installing
everything from source is not the first advice I'd give to a new user.

Ralf

If you want an all-in-one solution, you can also grab either the free EPD
> distribution or another of the "all-in-one" packs.
>
> A
>
>
> On Wed, Jul 4, 2012 at 7:03 PM, Paul Anton Letnes <
> paul.anton.letnes@gmail.com> wrote:
>
>> Hello,
>>
>> I don't know exactly what went wrong. I'd start out my debugging by
>> 1) which python # see whether you're running apple's python in
>> /usr/bin/python, or the one you tried to install
>> 2) which easy_install # did you run Apple-python's easy_install, or the
>> one you (tried to) installed?
>> 3) If all of the above match, try running python (not ipython) and try to
>> import numpy. Apple's python ships with numpy (at least the Lion / 10.7 one
>> does).
>> 4) Next, print numpy.__file__ to see whether numpy got installed to where
>> it should
>>
>> In general, I'd advice you to install one package at a time, then test it
>> to see whether it has been installed properly. When you're confident
>> everything is OK, move on to the next package. For instance, test numpy by
>> $ python -c 'import numpy; numpy.test()'
>> and scipy with
>> $ python -c 'import scipy;scipy.test()'
>> (for instance).
>>
>> When you're sure the fundament (python, numpy) is in order, proceed with
>> the house (scipy, matplotlib).
>>
>> Cheers
>> Paul
>>
>>
>> On 4. juli 2012, at 16:16, abc def wrote:
>>
>> >
>> > Hello,
>> >
>> > I'm new to python and I'd like to learn about numpy / scipy /
>> matplotlib, but I'm having trouble getting started.
>> >
>> > I'm following the instructions here:
>> http://www.scipy.org/Getting_Started
>> >
>> > First I installed the latest version of python from python.org by
>> downloading the dmg file, since I read that it doesn't work with apple's
>> installer, and then installed numpy / scipy / matplotlib by downloading the
>> relevent dmg files.
>> > I then downloaded ipython, ran "easy_install readline" and then ran
>> "python setup.py install".
>> >
>> > Then I started ipython with "ipython -pylab" as per the instructions
>> but then I get muliple error messages:
>> >
>> >
>> >
>> >
>> >
>> > $ ipython --pylab
>> >
>> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/utils/rlineimpl.py:111:
>> RuntimeWarning:
>> >
>> ******************************************************************************
>> > libedit detected - readline will not be well behaved, including but not
>> limited to:
>> >   * crashes on tab completion
>> >   * incorrect history navigation
>> >   * corrupting long-lines
>> >   * failure to wrap or indent lines properly
>> > It is highly recommended that you install readline, which is
>> easy_installable:
>> >     easy_install readline
>> > Note that `pip install readline` generally DOES NOT WORK, because
>> > it installs to site-packages, which come *after* lib-dynload in
>> sys.path,
>> > where readline is located.  It must be `easy_install readline`, or to a
>> custom
>> > location on your PYTHONPATH (even --user comes after lib-dyload).
>> >
>> ******************************************************************************
>> >  RuntimeWarning)
>> > Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43)
>> > Type "copyright", "credits" or "license" for more information.
>> >
>> > IPython 0.13 -- An enhanced Interactive Python.
>> > ?         -> Introduction and overview of IPython's features.
>> > %quickref -> Quick reference.
>> > help      -> Python's own help system.
>> > object?   -> Details about 'object', use 'object??' for extra details.
>> > [TerminalIPythonApp] GUI event loop or pylab initialization failed
>> >
>> ---------------------------------------------------------------------------
>> > ImportError                               Traceback (most recent call
>> last)
>> >
>> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/pylabtools.pyc
>> in find_gui_and_backend(gui)
>> >    194     """
>> >    195
>> > --> 196     import matplotlib
>> >    197
>> >    198     if gui and gui != 'auto':
>> >
>> >
>> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/__init__.py
>> in <module>()
>> >    131 import sys, os, tempfile
>> >    132
>> > --> 133 from matplotlib.rcsetup import (defaultParams,
>> >    134                                 validate_backend,
>> >    135                                 validate_toolbar,
>> >
>> >
>> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/rcsetup.py
>> in <module>()
>> >     17 import warnings
>> >     18 from matplotlib.fontconfig_pattern import
>> parse_fontconfig_pattern
>> > ---> 19 from matplotlib.colors import is_color_like
>> >     20
>> >     21 #interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'fltkagg',
>> 'qtagg', 'qt4agg',
>> >
>> >
>> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/colors.py
>> in <module>()
>> >     50 """
>> >     51 import re
>> > ---> 52 import numpy as np
>> >     53 from numpy import ma
>> >     54 import matplotlib.cbook as cbook
>> >
>> > ImportError: No module named numpy
>> >
>> > In [1]:
>> >
>> >
>> >
>> >
>> > it seems the installation of numpy and readline didn't work, and there
>> are problems with matplotlib, even though I think I followed all the
>> instructions carefully.
>> > I can't figure out what I did wrong. Can anybody help?
>> >
>> > I'm running mac os 10.6.
>> >
>> > Thank you!
>> >
>> > Tom
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > NumPy-Discussion mailing list
>> > NumPy-Discussion@scipy.org
>> > http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion@scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120704/c0202547/attachment.html 


More information about the NumPy-Discussion mailing list