Running "terraform apply" on Ubuntu 20.04 with python 3.8 I got the following error: ...
ImportError: cannot import name 'CosmosClient' from 'azure.cosmos' ...
My system has an Azure cosmos package already installed but with a different version, so this seems to create a conflict. Following the official guide (https://pypi.org/project/azure-cosmos/) I tried to configure a virtual environment first and that fixed the issue.
I would suggest to execute the python command always in a dedicated virtual env to avoid this and future issues.
Running "terraform apply" on Ubuntu 20.04 with python 3.8 I got the following error: ... ImportError: cannot import name 'CosmosClient' from 'azure.cosmos' ...
My system has an Azure cosmos package already installed but with a different version, so this seems to create a conflict. Following the official guide (https://pypi.org/project/azure-cosmos/) I tried to configure a virtual environment first and that fixed the issue.
I would suggest to execute the python command always in a dedicated virtual env to avoid this and future issues.