Couchbase Python SDK does not contain proper modules

Traceback (most recent call last):
  File "mainapi.py", line 7, in <module>
    from couchbase.options import (ClusterOptions, ClusterTimeoutOptions,
`ImportError: cannot import name 'ClusterOptions'`

I have installed al pre requisites. I have installed couchbase via pip install couchbase. I am using WSL with ubuntu.

Hi - run your script with python3 instead of python,

  • Mike

still not working. Same error.

Traceback (most recent call last):
  File "mainapi.py", line 7, in <module>
    from couchbase.options import (ClusterOptions, ClusterTimeoutOptions,
ImportError: cannot import name 'ClusterOptions'

Hi @rusbi - Some quick quetsions:

  • Can you provide the full output of the error?
  • What version of Python are you using?
  • Do you know what version of the SDK you have installed?
    • Can just provide output of python3 -m pip show couchbase

My inclination is that you have a 3.x version of the SDK installed and couchbase.options import ClusterOptions is only valid with a 4.x version of the SDK.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.