Installing Python SDK 3 in windows 10


I am following the instructions from to install sdk 3 of couchbase on my Windows machine but facing issue while running “python -m pip install couchbase” command.
This is the output error log after I run pip install command for couchbase:

Traceback (most recent call last):
File “C:\Users\dagarwal\Flipt-Projects\random-things\c3-venv\lib\site-packages\pip_vendor\”, line 280, in
File “C:\Users\dagarwal\Flipt-Projects\random-things\c3-venv\lib\site-packages\pip_vendor\”, line 263, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File “C:\Users\dagarwal\Flipt-Projects\random-things\c3-venv\lib\site-packages\pip_vendor\”, line 205, in build_wheel
File “C:\Users\dagarwal\AppData\Local\Temp\pip-build-env-gecl74h1\overlay\Lib\site-packages\setuptools\”, line 212, in build_wheel
wheel_directory, config_settings)
File “C:\Users\dagarwal\AppData\Local\Temp\pip-build-env-gecl74h1\overlay\Lib\site-packages\setuptools\”, line 197, in build_with_temp_dir
File “C:\Users\dagarwal\AppData\Local\Temp\pip-build-env-gecl74h1\overlay\Lib\site-packages\setuptools\”, line 249, in run_setup
File “C:\Users\dagarwal\AppData\Local\Temp\pip-build-env-gecl74h1\overlay\Lib\site-packages\setuptools\”, line 142, in run_setup
exec(compile(code, file, ‘exec’), locals())
File “”, line 94, in
File "C:\Users\dagarwal\AppData\Local\Temp\pip-build-env-gecl74h1\overlay\Lib\site-packages\setuptools_init
.py", line 165, in setup
return distutils.core.setup(**attrs)
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\distutils\”, line 148, in setup
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\distutils\”, line 955, in run_commands
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\distutils\”, line 974, in run_command
File “C:\Users\dagarwal\AppData\Local\Temp\pip-build-env-gecl74h1\overlay\Lib\site-packages\wheel\”, line 223, in run
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\distutils\”, line 313, in run_command
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\distutils\”, line 974, in run_command
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\distutils\command\”, line 135, in run
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\distutils\”, line 313, in run_command
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\distutils\”, line 974, in run_command
File “C:\Users\dagarwal\AppData\Local\Temp\pip-install-9hqvelgo\couchbase\”, line 62, in run
File “C:\Users\dagarwal\AppData\Local\Temp\pip-build-env-gecl74h1\overlay\Lib\site-packages\setuptools\command\”, line 87, in run
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\distutils\command\”, line 339, in run
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\distutils\command\”, line 448, in build_extensions
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\distutils\command\”, line 473, in _build_extensions_serial
File “C:\Users\dagarwal\AppData\Local\Temp\pip-install-9hqvelgo\couchbase\”, line 257, in build_extension
File “C:\Users\dagarwal\AppData\Local\Temp\pip-install-9hqvelgo\couchbase\”, line 183, in prep_build
File “C:\Users\dagarwal\AppData\Local\Programs\Python\Python36\lib\”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘–build’, ‘.’, ‘–config’, ‘Release’, ‘–’, ‘/m’]’ returned non-zero exit status 1.

ERROR: Failed building wheel for couchbase
Failed to build couchbase
ERROR: Could not build wheels for couchbase which use PEP 517 and cannot be installed directly

Can someone please help with this?
I am using Python 3.6.8
PS: I have upgraded pip, setuptools and wheel package as mentioned in the documentation.

Hi, this looks like a known issue, fixed in 3.0.4 which is due soon. In the meantime, you can install 3.0.4b1 as follows:

pip install couchbase==3.0.4b1

Let us know if that fixes the issue for you. Thanks!

Hi Ellis,

Thank you for your reply!

I just tried that but ran into same error.
Error happens when it tries to -

Building wheels for collected packages: couchbase
Building wheel for couchbase (PEP 517) … error
ERROR: Command errored out with exit status 1:

Also, just a fyi: couchbase sdk 2.5.4 is running fine on my system.

Hi, please run:

pip install couchbase==3.0.4b1  -v -v -v > build_log_304b1.txt 2>&1

Please also try:

pip install couchbase==3.0.1  -v -v -v > build_log_301.txt 2>&1

And send us the output (GDrive links are fine).



Sure, please find google drive link for both the files:



Ah, didn’t spot this was on Windows. There are some extra prerequisites there if a binary wheel is not available (which is the case for Python <3.7). We are working on building a greater variety of binary wheels on our CI systems but this is currently a work in progress.

We’d therefore encourage you to upgrade to 3.7 or above.

However, if you still want to use 3.6, you’ll need the relevant compiler binary here: plus the Python headers for the exact version of 3.6 you are using (the web installer for Windows provides these) before trying to install.

Hope that helps,


Thanks for the info!
I installed visual c libraries from the link given above and also did a fresh install of Python 3.6.8 (assuming python headers will be updated with this).

But still upon trying to install couchbase I am getting same error.
Is there a way by which you can verify I have correct binaries and python headers?


Hi, you need the full installer for Python - this should by default install headers/development libs - (this should also be specifiable from the command line with Include-dev=1). These should end up in your %PYTHONHOME%\include and %PYTHONHOME\lib directories in a correctly activated Python environment.

Hi, this is the relevant error message:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution"

You need to ensure that the VC140 toolset is activated in the environment you run install from - easiest to do this by running the relevant VC140 Command Prompt script from the Start Menu, activating the right Python from within that, then running python bdist_wheel to build the binary wheel in dist.