【问题标题】:Failed scipy installationscipy安装失败
【发布时间】:2019-01-22 14:39:18
【问题描述】:

我需要在没有 sudo 权限的运行 rhel fedora 6.5 的机器上安装 scipy 1.2.0 for python2.7 il local。

我已经安装了python2.7、numpy、ATLAS和openblas。

现在当我运行@python2.7 setup.py build”时,我收到了这个错误:

/home/gspirito/Python-2.7.14/scipy-1.2.0/scipy/cluster/_vq.c:8344: undefined reference to `PyInt_FromLong'
build/temp.linux-x86_64-2.7/scipy/cluster/_vq.o: In function `__Pyx_InitCachedConstants':
/home/gspirito/Python-2.7.14/scipy-1.2.0/scipy/cluster/_vq.c:8134: undefined reference to `PyTuple_Pack'
build/temp.linux-x86_64-2.7/scipy/cluster/_vq.o: In function `__Pyx_modinit_type_import_code':
/home/gspirito/Python-2.7.14/scipy-1.2.0/scipy/cluster/_vq.c:8395: undefined reference to `PyImport_ImportModule'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgfortranbegin.a(fmain.o): In function `main':
(.text+0x26): undefined reference to `MAIN__'
collect2: ld returned 1 exit status
error: Command "/usr/bin/gfortran -Wall -g -L/home/gspirito/src/zlib-1.2.8/lib -L/home/gspirito/packages/include/lzma -L/home/gspirito/src/postgresql-8.4.1/lib -L/home/gspirito/vargenius_bin/R-3.4.1/lib -L/home/gspirito/packages/lib build/temp.linux-x86_64-2.7/scipy/cluster/_vq.o -L/home/gspirito/Python-2.7.14/ATLAS/my_build_dir/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -Lbuild/temp.linux-x86_64-2.7 -latlas -latlas -latlas -lgfortran -o build/lib.linux-x86_64-2.7/scipy/cluster/_vq.so -Wl,--version-script=build/temp.linux-x86_64-2.7/link-version-scipy.cluster._vq.map" failed with exit status 1

有人知道怎么解决吗?

提前致谢

【问题讨论】:

  • 试试yum install python-devel
  • @BlackBear 嗨,谢谢你的回答,我不能这样做,因为我没有那台机器的 sudo 权限

标签: python scipy failed-installation


【解决方案1】:

显示的错误消息基本上表明链接器未能链接所有已编译的库。 exit status 1 意味着在链接之前有几个错误,因此 ld 退出。从Scipy Install 页面您基本上可以看到支持的python 发行版列表。

对于许多用户,尤其是在 Windows 上,最简单的开始方法是 下载这些 Python 发行版之一,其中包括所有关键 包:

Anaconda:带有科学软件包的免费 Python 发行版。 支持 Linux、Windows 和 Mac。

Enthought Canopy:免费和商业版本包括核心 科学包。支持 Linux、Windows 和 Mac。

Python(x,y):包含科学软件包的免费发行版,基于 围绕 Spyder IDE。 Windows 和 Ubuntu;仅限 Py2。

WinPython:另一个免费发行版,包括科学软件包和 Spyder IDE。仅限 Windows,但更积极地维护和 支持最新的 Python 3 版本。

Pyzo:基于 Anaconda 和 IEP 交互的免费发行版 开发环境。支持 Linux、Windows 和 Mac。

【讨论】:

    猜你喜欢
    • 2014-09-24
    • 2016-07-20
    • 2012-09-16
    • 1970-01-01
    • 2016-07-28
    • 1970-01-01
    • 1970-01-01
    • 2019-03-14
    • 1970-01-01
    相关资源
    最近更新 更多