我需要在运行rhel fedora 6.5的机器上为python2.7il local安装scipy 1.2.0,在该机器上我没有sudo权限。
我已经安装了python2.7,numpy,ATLAS和openblas。
现在,当我运行@python2.7 setup.py build时,“I get this error:
/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有谁知道怎么解决这个问题吗?
提前感谢
发布于 2019-01-22 23:45:38
显示的错误消息实质上是指链接器无法链接所有已编译的库。exit status 1表示在链接之前有几个错误,因此ld退出。在Scipy Install页面上,您实际上可以看到所支持的python发行版的列表。
对于许多用户来说,最简单的开始方式是下载其中一个Python发行版,其中包括所有的关键包:
Anaconda:随科学包免费分发的Python。支持Linux、Windows和Mac。
天幕:免费和商业版本包括核心科学包。支持Linux、Windows和Mac。
Python(x,y):基于Spyder IDE的免费发行版,包括科学包。Windows和Ubuntu;仅限Py2。
WinPython:另一个免费发行版,包括科学软件包和Spyder IDE。仅适用于Windows,但更积极地维护,并支持最新的Python 3版本。
Pyzo:基于Anaconda和IEP交互式开发环境的免费发行版。支持Linux、Windows和Mac。
https://stackoverflow.com/questions/54310646
复制相似问题