-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
msrest and msrestazure dependencies not installed #644
Comments
Hi @freefood89 , I saw rare situations where msrest(azure) dependencies are not installed. I think it's related to this pip issue: Because msrest(azure) in a sub-dependencies of an Thank you for the feedback, I will try to find a smart way to make this more predictable. |
I seem to have the same problem. I initially did:
mrestazure was not installed as a dependency during the initial install of Some versioning: Please note @lmazuel The above post is simply to showcase and inform that installing azure does not include all dependencies in specific situations as you've previously observed; the contrib script is out of scope for this section. (The fix was to point the contrib script to python 2.7 instead of 2.6). |
Thanks for the feedback @elemantalcode ! |
Just ran into this same issue. "pip install msrestazure" corrected the problem for me. OS: Centos 7.2 |
@lmazuel I use the following commands to install SDK for Python3.5 My OS is: Ubuntu 16.04LTS |
This issue is now 6 months old, and there's still not a clean way to install the azure sdk for python. Any updates on this? |
Hi, I have also problems with dependencies with Ansible (running Ubuntu 16.04 LTS) with Azure SDK for python. I tried everything described on this page. nothing works. Still get the message Try |
@trondhindenes I started to change the way I install @squasta if you have a message "no module named common.credentials", then you're not into this issue. This issue installs correctly |
Thanks for the update @lmazuel , good to know that the issue is being worked on. |
@trondhindenes I pushed a commit and changed them all: GH has closed the issue automatically, I guess it's fair, but the fix will be published package per package only each time I publish new release. I will not publish new version of everything just for this. However, an update of Please feel free to still comment here, even closed, and I re-open it if necessary. |
I am using Mac (10.12.3) and python 2.7.13 All succeed but I still got : |
I have the same issue , any update on this ? |
Hi @rkumar357 |
I have problem with Python 2.7.10 , Python 2.7.13 got succeeded. |
It's a random issue, depending on the order pip process the dependencies. This is not related to Python version (unless Python is shipped with pip and pip is newer with 2.7.13, it's possible). |
Cheers @lmazuel , working fine , thanks for the help. |
So I just installed azure az new installation on fedora 24, got the same error and cannot use module at all. Any advise ? Same in docker ubuntu after : pip install "azure==2.0.0rc5"
|
Hi @Ment0s |
pip output : http://pastebin.com/RgQDNF0s With ansible from git I get these errors : "Do you have azure==2.0.0rc5 installed? Try pip install rc5 : http://pastebin.com/QNrsFk6Y |
@Ment0s , ansible using old version of python, just check in verbose mode, to execute any pthyon script ansible will use /usr/bin/python or something esle ? /usr/bin/python --version if you have done brew install then Cellar/bin/python --version Compare which python is used while executing ansible python script, i have soft link 2.7 python library to /usr/bin/python, since ansible is using that location for me. |
I have the same problem with a fresh install on MacOS Python version is 2.7.13. I tried uninstalling and re-installing azure, azure-mgmt, msrest and msrestazure, but this didn't work. |
Hi @mkesselaers Can you open a python interpreter and type "import msrest"? Thanks, |
Hi @lmazuel, This doesn't give any error, which seems like everything is fine. Best regards, |
If you are able to import msrest from a Python interpreter but Ansible can't, might be a problem with Ansible (it's Ansible right?) |
Yes, you're right. But since the error that I've got was found on this thread, I thought that it would be best to post it here. |
Try running, ansible-playbook test.yml -e ansible_python_interpreter=/usr/local/opt/python/bin/python2.7 |
Hi @rkumar357 , This works indeed. Thanks for your help! |
Cheers !!! for ansible i belive python 2 is deafult. |
@rkumar357 @mkesselaers Ansible does not support Python 3 at all for now (see on PyPI). So only option here is Python 2.7. I don't know how Ansible is defining his shebang, but if for some reason it starts with Py3 by default you will be in trouble. |
I am running Ansible (2.2.2.0 or 2.3.0.0) inside a docker container and am receiving the same msrestazure.azure_exceptions error despite applying the various fixes noted above.
Looking at the azure_rm.py code, it looks like it is just failing upon import (I'm not a python dev... yet). From what I have read, providing the reference to the path where azure_rm.py lives should be sufficient for python to pick up the remaining libraries listed in the import... though I'm not certain. |
Hi @aaronjones Could you try:
|
slightly embarrassing, but delivers the same result and same problem. (I didn't realize python wasn't installed in that same location, so it must have defaulted to what was installed) Traceback (most recent call last): |
So, you can install msrestazure this way (assuming you have sudo access): |
Sorry for the delay in response. It has at least moved me forward to a credentials error, so that is progress. I guess the ansible documentation or possibly the sdk readme may need updating to reflect the requirement of installing mrestazure separately? |
msrestazure is not supposed to be installed separately, but we got issues in the past with pip. We fixed that in recent packages, but likely you got it with old version :( |
I just ran into this on OS X 10.11.6. Just in case someone else runs into this, my (seemingly) underlying issue was that I installed ansible via brew, which installs python 2.7.13 as a dep. Running The fix was to ensure that I'm using python 2.7.13 - I went ahead and updated my |
My solution is a workable way to solve No module named msrest.serialization issue. Need to use its pip script to install azure packages |
I have a similar issue, not sure if its a compatibility issue between msrest version and azure commons , tried reinstalling, installling on a new venv. I am trying to use azure azure_rm_keyvault_info - Here is the error trace - Any suggestions would help >
tried installing them manually no luck |
Is it just me, or does this package not install dependencies?
pip3 install azure
from azure.common.credentials import UserPassCredentials
resulted inImportError: No module named 'msrest'
pip3 install msrest
from azure.common.credentials import UserPassCredentials
resulted inImportError: No module named 'msrestazure'
pip3 install msrestazure
from azure.common.credentials import UserPassCredentials
finally workedThe text was updated successfully, but these errors were encountered: