无法在Windows 7和PythonXY上安装sparsesvd

2024-04-25 20:19:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在我的PythonXY上安装sparsesvd库,但是遇到了一些问题。我的环境是windows7,我已经安装了PythonXY 2.7.3.1和mingw32(gcc-vand g++ver)。4.7.2节)。我编辑过distutils.cygwinc编译器删除所有“-mno cygwin”并分布.cfg我指定编译器为mingw32。在

但是,当我从shell运行easy_install sparsesvd时,我会返回:

PS C:\Windows\system32> easy_install sparsesvd
Searching for sparsesvd
Reading http://pypi.python.org/simple/sparsesvd/
Best match: sparsesvd 0.1.9
Downloading http://pypi.python.org/packages/source/s/sparsesvd/sparsesvd-0.1.9.tar.gz#md5=8219890650435a289d7cdf8b61d6ea
74
Processing sparsesvd-0.1.9.tar.gz
Writing c:\users\luca\appdata\local\temp\easy_install-ykdljq\sparsesvd-0.1.9\setup.cfg
Running sparsesvd-0.1.9\setup.py -q bdist_egg --dist-dir c:\users\luca\appdata\local\temp\easy_install-ykdljq\sparsesvd-
0.1.9\egg-dist-tmp-ylcsow
Found executable C:\MinGW\bin\gcc.exe
Found executable C:\MinGW\bin\g++.exe
build\temp.win32-2.7\Release\sparsesvd.o:sparsesvd.c:(.text+0x8db): undefined reference to `__sync_fetch_and_add_4'
build\temp.win32-2.7\Release\sparsesvd.o:sparsesvd.c:(.text+0x3fa5): undefined reference to `__sync_fetch_and_add_4'
build\temp.win32-2.7\Release\sparsesvd.o:sparsesvd.c:(.text+0x4901): undefined reference to `__sync_fetch_and_sub_4'
build\temp.win32-2.7\Release\sparsesvd.o:sparsesvd.c:(.text+0x4a1b): undefined reference to `__sync_fetch_and_sub_4'
build\temp.win32-2.7\Release\sparsesvd.o:sparsesvd.c:(.text+0xb105): undefined reference to `__sync_fetch_and_sub_4'
build\temp.win32-2.7\Release\sparsesvd.o:sparsesvd.c:(.text+0xb143): undefined reference to `__sync_fetch_and_sub_4'
build\temp.win32-2.7\Release\sparsesvd.o:sparsesvd.c:(.text+0xb181): undefined reference to `__sync_fetch_and_sub_4'
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: build\temp.win32-2.7\Release\sparsesvd.o: bad reloc address 0xc in section `.data'
collect2.exe: error: ld returned 1 exit status
error: Setup script exited with error: Command "g++ -shared build\temp.win32-2.7\Release\sparsesvd.o build\temp.win32-2.
7\Release\svdlibc\las2.o build\temp.win32-2.7\Release\svdlibc\svdutil.o build\temp.win32-2.7\Release\svdlibc\svdlib.o -L
C:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lmsvcr90 -o build\lib.win32-2.7\sparsesvd.pyd" failed with exit status 1
C:\Python27\lib\site-packages\numpy\distutils\misc_util.py:252: RuntimeWarning: Parent module 'numpy.distutils' not found while handling absolute import from numpy.distutils import log

命令pip install sparsesvd也出现了同样的问题。 有什么问题吗?在


Tags: installandtotextbuildreleasesyncfetch