gpt4 book ai didi

python - Numpy 导入 "Aborted"

转载 作者:太空宇宙 更新时间:2023-11-03 19:03:37 25 4
gpt4 key购买 nike

我正在安装了 root 的 Linux 服务器上 python2.7 (/usr/bin/python2.7)。然后我尝试通过下载源代码并执行 python2.7 setup.py build; python2.7 setup.py install --user 来安装 Numpy。 。 Numpy 整齐地安装到 ~/.local/lib/python2.7/site-packages/numpy 。我得到:

$ 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
$

我该从哪里开始呢?我以前从未见过这个!

(仅供引用,默认的 python (2.6),在 /usr/lib/pymodules/python2.6/numpy 中有一个可用的 numpy 安装)

根据要求,堆栈跟踪,(感谢您的指示!)。整个事情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 ()

最佳答案

这看起来像是版本控制问题。确保您不会无意中将为 Python 2.6 构建的模块加载到 Python 2.7 中。

首先要检查的是 $PYTHONPATHsys.path

关于python - Numpy 导入 "Aborted",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15357466/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com