ine-labs / AzureGoat

AzureGoat : A Damn Vulnerable Azure Infrastructure
MIT License
776 stars 177 forks source link

fix 'CosmosClient' import error #12

Closed mkcn closed 11 months ago

mkcn commented 1 year ago

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.