Skip to content
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

az aks list - No module named '_cffi_backend' #5034

Closed
spboyer opened this issue Dec 4, 2017 · 13 comments
Closed

az aks list - No module named '_cffi_backend' #5034

spboyer opened this issue Dec 4, 2017 · 13 comments
Assignees
Labels
AKS az aks/acs/openshift bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention This issue is responsible by Azure service team.

Comments

@spboyer
Copy link
Member

spboyer commented Dec 4, 2017

Command Ran: az aks list

Fixed issue with brew link --overwrite python3

Environment summary

Install Method: pip & homebrew
CLI Version: azure-cli (2.0.21)

Python location '/usr/local/opt/python3/bin/python3.6'
Extensions directory '/Users/shayneboyer/.azure/cliextensions'

Python (Darwin) 3.6.3 (default, Nov  1 2017, 11:10:52)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38)]

Error:

No module named '_cffi_backend'
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/azure/cli/main.py", line 36, in main
    cmd_result = APPLICATION.execute(args)
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/azure/cli/core/application.py", line 177, in execute
    self.configuration.load_params(command)
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/azure/cli/core/application.py", line 50, in load_params
    commands.load_params(command)
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 391, in load_params
    command_table[command].load_arguments()
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 335, in load_arguments
    self.arguments.update(self.arguments_loader())
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 647, in arguments_loader
    return extract_args_from_signature(get_op_handler(operation), no_wait_param=no_wait_param)
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 537, in get_op_handler
    op = import_module(mod_to_import)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/azure/cli/command_modules/acs/custom.py", line 37, in <module>
    from azure.cli.command_modules.acs import acs_client, proxy
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/azure/cli/command_modules/acs/acs_client.py", line 12, in <module>
    import paramiko
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/paramiko/__init__.py", line 31, in <module>
    from paramiko.transport import SecurityOptions, Transport
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/paramiko/transport.py", line 57, in <module>
    from paramiko.ed25519key import Ed25519Key
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/paramiko/ed25519key.py", line 17, in <module>
    import bcrypt
  File "/usr/local/Cellar/azure-cli/2.0.21/libexec/lib/python3.6/site-packages/bcrypt/__init__.py", line 25, in <module>
    from bcrypt import _bcrypt
ImportError: No module named '_cffi_backend'
@tjprescott tjprescott added ACS az acs/aks/openshift bug This issue requires a change to an existing behavior in the product in order to be resolved. labels Dec 5, 2017
@skyhit
Copy link

skyhit commented Dec 6, 2017

I got the same problem in macOS

@julienstroheker
Copy link
Contributor

Did you try brew link --overwrite python3 ?

@benofben
Copy link

benofben commented Mar 16, 2018

This fixed it for me --- brew link --overwrite python3 I also had an old az hiding in my path that was painful to hunt down.

@qiangli
Copy link

qiangli commented May 30, 2018

Cool! brew link --overwrite python3 fixed same issue for azure-cli (2.0.33) on
System Version: OS X 10.11.6 (15G1217) Kernel Version: Darwin 15.6.0

@shershen08
Copy link

Having the same problem!

Tried:

$: brew link --overwrite python3
Warning: Already linked: /usr/local/Cellar/python/3.7.0
To relink: brew unlink python && brew link python
$: brew unlink python
$: brew link --overwrite python3
$: az aks browse
No module named '_cffi_backend'
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.0.38/libexec/lib/python3.6/site-packages/knack/cli.py", line 197, in invoke
    cmd_result = self.invocation.e

Didn't solve an issue for me.

@kventil
Copy link

kventil commented Jul 1, 2018

Same here.

△ ~ az --version
azure-cli (2.0.38)

 ▲ ~ python3 --version
Python 3.7.0

Update:
python3 -m pip install cffi fixed it for me.

@frli
Copy link

frli commented Jul 2, 2018

Thanks @kventil, that fixed it for me as well.

@shershen08
Copy link

@kventil Thanks!

@brichins
Copy link

brichins commented Jul 2, 2018

@kventil - Your workaround worked like a charm for me. Thank you for posting.

@twitchax
Copy link
Contributor

twitchax commented Jul 3, 2018

@mboersma for FYI.

@bsiegel bsiegel added the Service Attention This issue is responsible by Azure service team. label Sep 26, 2018
@kgopi05
Copy link

kgopi05 commented Nov 27, 2018

@kventil Thanks! it works for me ..

@tjprescott tjprescott added AKS az aks/acs/openshift and removed ACS az acs/aks/openshift labels Nov 30, 2018
@mboersma
Copy link
Member

mboersma commented Jan 3, 2019

@tjprescott this was a quirk of Homebrew packaging and the workaround shouldn't be necessary any longer. I think this can be closed.

@shuchow
Copy link

shuchow commented Feb 1, 2019

FYI, I was still having this issue with Homebrew 1.9.3 (2/2/2019 commit) and azure-cli version 2.0.57. Had to use "brew link --overwrite python3" to solve the issue.

@haroldrandom haroldrandom added AKS az aks/acs/openshift bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention This issue is responsible by Azure service team. labels Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AKS az aks/acs/openshift bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests