1

I am working on a linux server with a root installed python2.7 (/usr/bin/python2.7). Then I tried to install Numpy into this by downloading the source and doing python2.7 setup.py build; python2.7 setup.py install --user. Numpy neatly installs to ~/.local/lib/python2.7/site-packages/numpy. I get:

$ python2.7
Python 2.7.2+ (default, Dec 22 2011, 12:26:43)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Aborted
$

Where do I even start? I've never seen this before!

(FYI, the default python (2.6), has a working numpy install in /usr/lib/pymodules/python2.6/numpy)

As requested, a stacktrace, (and thanks for the instructions on that!). Whole thing here on pastebin.

Program received signal SIGABRT, Aborted.
0x00002aaaabdb31b5 in *__GI_raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
    in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0  0x00002aaaabdb31b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00002aaaabdb5fc0 in *__GI_abort () at abort.c:92
#2  0x00002aaab03fb9bd in free () from /usr/lib/python2.7/lib-dynload/_ctypes.so
#3  0x00002aaab03f8312 in ?? () from /usr/lib/python2.7/lib-dynload/_ctypes.so
#4  0x00002aaab03f8924 in ffi_closure_alloc () from /usr/lib/python2.7/lib-dynload/_ctypes.so
#5  0x00002aaab03f0af2 in _ctypes_alloc_callback () from /usr/lib/python2.7/lib-dynload/_ctypes.so
#6  0x00002aaab03eee68 in ?? () from /usr/lib/python2.7/lib-dynload/_ctypes.so
#7  0x00000000004b6ed5 in ?? ()
#8  0x0000000000425cdc in PyObject_Call ()
2
  • Looks like that numpy build is killing python. I would just try to install another version of numpy. If you feel investigative you could "ulimit -c unlimited" to make it create a coredump and then look at it using gdb. Commented Mar 12, 2013 at 10:08
  • 1
    A stack trace would go a long way, perhaps. You could also try running python directly in gdb: gdb $(which python2.7) then at the prompt r and then do your import numpy. Then after it aborts, run bt and post the result here. Commented Mar 12, 2013 at 10:14

2 Answers 2

1

This looks like a versioning issue. Make sure you are not inadvertently loading into Python 2.7 a module built for Python 2.6.

The first things to check would be $PYTHONPATH and sys.path.

Sign up to request clarification or add additional context in comments.

1 Comment

I don't see anything pointing to 2.6. sys.path == ['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '~/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
0

I never found out what was causing this, but I had the admin install numpy as root and it works now.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.