所以,我一直在尝试安装py-notify(现在我遇到了尝试安装cython的同样问题),但我遇到了一个我无法解决的问题谷歌这次(现在唯一的结果就是这个问题......)
首先,我遇到了这个问题:http://pastebin.com/0hs6ngsj
按照this page上的步骤创建文件libpython27.a
(似乎是必需的)并将其放入C:\Python27\libs\
后,我现在得到此错误:
C:\...>easy_install py-notify
Searching for py-notify
Reading http://pypi.python.org/simple/py-notify/
Reading http://home.gna.org/py-notify/
Reading http://download.gna.org/py-notify/
Best match: py-notify 0.3.1
Downloading http://pypi.python.org/packages/source/p/py-notify/py-notify-0.3.1.tar.gz#md5=58428761bc196bf9b1f1d930991ee3ca
Processing py-notify-0.3.1.tar.gz
Running py-notify-0.3.1\setup.py -q bdist_egg --dist-dir c:\users\nightkev\appdata\local\temp\easy_install-qfiohj\py-notify-0.3.1\egg-dist-tmp-zoe6ad
C:\Python27\libs\libpython27.a(dwtms01015.o):(.idata$7+0x0): undefined reference to `_head_libpython27_a'
C:\Python27\libs\libpython27.a(dwtms00254.o):(.idata$7+0x0): undefined reference to `_head_libpython27_a'
C:\Python27\libs\libpython27.a(dwtms00713.o):(.idata$7+0x0): undefined reference to `_head_libpython27_a'
C:\Python27\libs\libpython27.a(dwtms00221.o):(.idata$7+0x0): undefined reference to `_head_libpython27_a'
C:\Python27\libs\libpython27.a(dwtms00008.o):(.idata$7+0x0): undefined reference to `_head_libpython27_a'
C:\Python27\libs\libpython27.a(dwtms00338.o):(.idata$7+0x0): more undefined references to `_head_libpython27_a' follow
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1
error: Setup script exited with error: command 'dllwrap' failed with exit status 1
Python信息:
ActivePython 2.7.2.5 (ActiveState Software Inc.) based on
Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit (Intel)] on win32
操作系统:Windows 7 Professional Edition x64
我不确定我可能需要提供哪些其他信息。
答案 0 :(得分:0)
我遇到了同样的问题。我能想到的最好的解决方案是废弃MinGW并安装Visual Studio。对于Python 2.7,您需要Visual Studio C ++ Express Edition 2008(请注意,2010将无效!)
http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express
如果您想出一个适用于MinGW的答案,请告诉我。