我试图在Windows 10上安装Couchbase,但无法完成安装过程:
我已经尝试过:
python -m pip install couchbase
python -m pip install git+git://github.com/couchbase/couchbase-python-client
错误:
creating build\temp.win-amd64-3.6\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D_CRT_SECURE_NO_WARNINGS=1 -I..\lcb-winbuild\x64\deps\include -IC:\Users\allynh\my_project\\venv\include "-IC:\Program Files\Python36\include" "-IC:\Program Files\Python36\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /Tcsrc\exceptions.c /Fobuild\temp.win-amd64-3.6\Release\src\exceptions.obj
exceptions.c
c:\users\allynh\appdata\local\temp\pip-hftjqesn-build\src\pycbc.h(91): fatal error C1083: Cannot open include file: 'libcouchbase/couchbase.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.13.26128\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Users\allynh\my_project\\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\allynh\\AppData\\Local\\Temp\\pip-hftjqesn-build\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\allynh\AppData\Local\Temp\pip-louphgm2-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\allynh\my_project\\venv\include\site\python3.6\couchbase" failed with error code 1 in C:\Users\allynh\AppData\Local\Temp\pip-hftjqesn-build\
我认为这失败了,因为我没有安装libcouchbase,但是我不知道如何安装它。我想我需要安装Windows binary package,但是我不确定该怎么做...
非常感谢您的帮助。
答案 0 :(得分:2)
https://pypi.org/project/couchbase/#files上有Windows安装程序。先尝试一下。
如果您确实需要从源代码安装,则需要输入多个prerequisites: