我正在尝试在我的PythonXY上安装sparsesvd库,但是我遇到了一些问题。我的环境是Windows 7,我安装了PythonXY 2.7.3.1和mingw32(gcc vand g ++ ver.4.7.2)。我编辑了distutils.cygwinccompiler删除所有“-mno-cygwin”并有一个distutils.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
出现同样的问题。
可能是什么问题?