segmentation fault when installing with pip and python2.7

Hello, I just installed numpy on Snow Leopard using pip. However, running the tests results in a segmentation fault. Has anybody else encountered this problem? How did you solve it? The sequence of commands that reproduce the bug is: $ pip install numpy $ python -c "import numpy; numpy.test('10')" And this is the output: Running unit tests for numpy NumPy version 1.4.1 NumPy is installed in /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/numpy Python version 2.7 (r27:82500, Jul 18 2010, 06:55:14) [GCC 4.2.1 (Apple Inc. build 5664)] nose version 0.11.4 ...................................................................................................................................Segmentation fault Regards, Celil

Hi, I don't know about pip but if you use macports all the python 2.6, scipy et al libs all set up fine with problems on snow leopard. If you really want 2.7 then not sure what to say. Martin celil wrote:
Hello,
I just installed numpy on Snow Leopard using pip. However, running the tests results in a segmentation fault. Has anybody else encountered this problem? How did you solve it?
The sequence of commands that reproduce the bug is:
$ pip install numpy $ python -c "import numpy; numpy.test('10')"
And this is the output:
Running unit tests for numpy NumPy version 1.4.1 NumPy is installed in /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/numpy Python version 2.7 (r27:82500, Jul 18 2010, 06:55:14) [GCC 4.2.1 (Apple Inc. build 5664)] nose version 0.11.4
...................................................................................................................................Segmentation fault
Regards, Celil _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
-- View this message in context: http://old.nabble.com/segmentation-fault-when-installing-with-pip-and-python... Sent from the Numpy-discussion mailing list archive at Nabble.com.

On Fri, Jul 23, 2010 at 11:46 AM, celil <celil.kj@gmail.com> wrote:
Hello,
I just installed numpy on Snow Leopard using pip. However, running the tests results in a segmentation fault. Has anybody else encountered this problem? How did you solve it?
Do not use pip or easy_install, these tools are not very reliable. This question gets asked very regularly, and just plain "python setup.py install" usually solves the problem.
Besides that, you're using python 2.7, so you have to compile numpy trunk or 1.5.x branch, 1.4.1 does not work. Cheers, Ralf

On Sat, Jul 24, 2010 at 1:44 AM, Ralf Gommers <ralf.gommers@googlemail.com>wrote:
On Fri, Jul 23, 2010 at 11:46 AM, celil <celil.kj@gmail.com> wrote:
Hello,
I just installed numpy on Snow Leopard using pip. However, running the tests results in a segmentation fault. Has anybody else encountered this problem? How did you solve it?
Do not use pip or easy_install, these tools are not very reliable. This question gets asked very regularly, and just plain "python setup.py install" usually solves the problem.
Besides that, you're using python 2.7, so you have to compile numpy trunk or 1.5.x branch, 1.4.1 does not work.
Cheers, Ralf
I have to wonder why this question keeps coming up. Do we need to make the build/installation instructions on the website clearer? Maybe explicitly state which common methods of installing python tools should and should not be used? I am not quite familiar with pip and such, but could there be some way to have the numpy package on PyPi return a message saying that one should build from source instead? Or is there something that can be done to make installing using pip better? Ben Root

On Sun, Jul 25, 2010 at 3:39 AM, Benjamin Root <ben.root@ou.edu> wrote:
I have to wonder why this question keeps coming up.
In general, because the packaging/build infrastructure in python is horrible. However, in this precise case, the issue is simply that numpy 1.4.1 does not support python2.7. cheers, David

On Sat, Jul 24, 2010 at 2:38 PM, David Cournapeau <cournape@gmail.com>wrote:
On Sun, Jul 25, 2010 at 3:39 AM, Benjamin Root <ben.root@ou.edu> wrote:
I have to wonder why this question keeps coming up.
In general, because the packaging/build infrastructure in python is horrible.
However, in this precise case, the issue is simply that numpy 1.4.1 does not support python2.7.
cheers,
David
Hmm, maybe I should phrase my question differently... I meant to ask is if there is some way that we could 1) better discourage the use of these methods 2) improve the error messages of failed installation attempts to help users (maybe have a particular webpage available with FAQ regarding installation issues and have that URL printed in the case of an installation failure)? The idea being that we might be able to better head-off these questions to the mailing list by providing a better resource for dealing with installation issues, and to have this resource available at the user's fingertips. Ben Root
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

On Sun, Jul 25, 2010 at 6:21 AM, Benjamin Root <ben.root@ou.edu> wrote:
On Sat, Jul 24, 2010 at 2:38 PM, David Cournapeau <cournape@gmail.com> wrote:
On Sun, Jul 25, 2010 at 3:39 AM, Benjamin Root <ben.root@ou.edu> wrote:
I have to wonder why this question keeps coming up.
In general, because the packaging/build infrastructure in python is horrible.
However, in this precise case, the issue is simply that numpy 1.4.1 does not support python2.7.
cheers,
David
Hmm, maybe I should phrase my question differently... I meant to ask is if there is some way that we could
1) better discourage the use of these methods
We already discourage them on the ML. But as much as I and other loathe those tools, we should not tell people how to install things or worse prevent people who want to use them from using them.
2) improve the error messages of failed installation attempts to help users (maybe have a particular webpage available with FAQ regarding installation issues and have that URL printed in the case of an installation failure)?
I was hoping that ask.scipy.org would do that, but it seems that we have not found a way to "bootstrap" it yet. But actually, I think my original answer is the only reasonable one in the long term. The only way to stop those recurring questions is to fix the tools by creating our own. I would rather spend time working on a solution that makes distutils insanity go away rather than patching things over and over to circumvent a broken framework. cheers, David

On Sat, Jul 24, 2010 at 8:38 PM, David Cournapeau wrote:
In general, because the packaging/build infrastructure in python is horrible.
However, in this precise case, the issue is simply that numpy 1.4.1 does not support python2.7.
How about a tiny update to the numpy 1.4.x on PyPi which checks for Python 2.7 and aborts with a message suggesting waiting for NumPy 1.5.x or using Python 2.6 instead? Peter

On Jul 24, 2010, at 11:39 AM, Benjamin Root wrote:
I have to wonder why this question keeps coming up. Do we need to make the build/installation instructions on the website clearer?
Yes. I was one who asked recently. I've not seen easy_install nor pip mentioned on the website nor INSTALL.txt. One sentence advising to avoid these tools, and to just use setup.py would help a lot. This page mentions basic build instructions: http://www.scipy.org/Installing_SciPy/BuildingGeneral But that is somewhat obscure for someone downloading the tarball and reading INSTALL.txt. It should maybe state the essential info upfront (i.e., "python setup.py install"), but it jumps right into Fortran ABI mismatch. Being impatient, my first thought was, "Yikes, OK, might as well try easy_install first before slogging through this." -Geoff
participants (7)
-
Benjamin Root
-
celil
-
David Cournapeau
-
Geoffrey Ely
-
mdekauwe
-
Peter
-
Ralf Gommers