OSX, PyCharm, with brew-installed python 2.7, simply trying to import
from azure.mgmt.common import SubscriptionCloudCredentials
import azure.mgmt.compute
import azure.mgmt.network
import azure.mgmt.resource
import azure.mgmt.storage
Got error:
/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/python2.7 XXX/pythonCode/p2.1/azure.py
Traceback (most recent call last):
File "XXX/pythonCode/p2.1/azure.py", line 9, in <module>
from azure.mgmt.common import SubscriptionCloudCredentials
File "XXX/pythonCode/p2.1/azure.py", line 9, in <module>
from azure.mgmt.common import SubscriptionCloudCredentials
ImportError: No module named mgmt.common
Tried:
Reinstall azure from source
Running
python -c "import site; print(site.getsitepackages())"
I get
['/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/site-python', '/Library/Python/2.7/site-packages']
In which
/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
contains azureRunning
python -c "import sys; print(sys.path)"
I get
'', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/usr/local/Cellar/numpy/1.10.4/libexec/nose/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages'
Remarkably Running
python -c "from azure.mgmt.common import SubscriptionCloudCredentials"
in terminal does not error at all.
Can anyone explain where the problems are?