无法在Windows 7 64位上安装python的pylibmc

时间:2015-09-06 15:23:54

标签: visual-studio python-2.7 memcached pylibmc

我有一台Windows 7 64位笔记本电脑并安装了memcached,但在通过pip安装pylibmc时出错:

pip install pylibmc

我收到以下错误:

PS C:\Users\ABC> pip install pylibmc
Collecting pylibmc
  Using cached pylibmc-1.5.0.tar.gz
Installing collected packages: pylibmc
  Running setup.py install for pylibmc
    Complete output from command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\ABC\\a
ppdata\\local\\temp\\pip-build-ecqocv\\pylibmc\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().
replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\ABC\appdata\local\temp\pip-gcnwr7-record\insta
ll-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-2.7
    creating build\lib.win32-2.7\pylibmc
    copying src\pylibmc\client.py -> build\lib.win32-2.7\pylibmc
    copying src\pylibmc\consts.py -> build\lib.win32-2.7\pylibmc
    copying src\pylibmc\pools.py -> build\lib.win32-2.7\pylibmc
    copying src\pylibmc\test.py -> build\lib.win32-2.7\pylibmc
    copying src\pylibmc\__init__.py -> build\lib.win32-2.7\pylibmc
    copying src\pylibmc\__main__.py -> build\lib.win32-2.7\pylibmc
    running build_ext
    building '_pylibmc' extension
    creating build\temp.win32-2.7
    creating build\temp.win32-2.7\Release
    creating build\temp.win32-2.7\Release\src
    C:\Users\ABC\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD
 /W3 /GS- /DNDEBUG -DUSE_ZLIB -IC:\Python27\include -IC:\Python27\PC /Tcsrc/_pylibmcmodule.c /Fobuild\temp.win32-2.7\Rel
ease\src/_pylibmcmodule.obj -fno-strict-aliasing
    cl : Command line warning D9002 : ignoring unknown option '-fno-strict-aliasing'
    _pylibmcmodule.c
    c:\users\ABC\appdata\local\temp\pip-build-ecqocv\pylibmc\src\_pylibmcmodule.h(42) : fatal error C1083: Cannot o
pen include file: 'libmemcached/memcached.h': No such file or directory
    error: command 'C:\\Users\\ABC\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bi
n\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\ABC\\appdata\\local\\temp\\pip
-build-ecqocv\\pylibmc\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), _
_file__, 'exec'))" install --record c:\users\ABC\appdata\local\temp\pip-gcnwr7-record\install-record.txt --single-v
ersion-externally-managed --compile" failed with error code 1 in c:\users\ABC\appdata\local\temp\pip-build-ecqocv\p
ylibmc
PS C:\Users\ABC>

我做错了什么?它与Windows 7 64位不兼容吗?我该如何解决这个问题?

0 个答案:

没有答案