首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在Windows7和PythonXY上安装sparsesvd

无法在Windows7和PythonXY上安装sparsesvd
EN

Stack Overflow用户
提问于 2013-06-05 17:23:28
回答 1查看 897关注 0票数 0

我正在尝试在我的PythonXY上安装sparsesvd库,但是我遇到了一些问题。我的环境是Windows7,我已经安装了PythonXY 2.7.3.1和mingw32 (gcc vand g++版本。4.7.2)。我编辑了distutils.cygwinccompiler,删除了所有的"-mno-cygwin“,并创建了一个distutils.cfg,其中我指定编译器为mingw32。

然而,当我从shell easy_install sparsesvd运行时,我会返回:

代码语言:javascript
复制
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也会出现同样的问题。可能的问题是什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-06-05 18:21:59

阅读错误的最后一行。

找不到父模块'numpy.distutils‘

您必须先安装numpy

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16936163

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档