MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

Local AutoML environment error: cannot import name '_get_backend'

Open tylercmsft opened this issue 5 years ago • 2 comments

Hello, I've setup a local environment (in Anaconda) using the automl_setup.cmd script; everything works fine (initially). Then, a bit later (and after I've installed other libraries e.g., pyodbc), I am unable to use any of azure ml libraries. Example, import azureml.core results in something like this:

ImportError Traceback (most recent call last) in ----> 1 import azureml.core

............

C:\ProgramData\Anaconda3\envs\azure_automl\lib\site-packages\cryptography\hazmat\primitives\serialization\base.py in 10 _PUBLIC_KEY_TYPES, 11 ) ---> 12 from cryptography.hazmat.backends import _get_backend 13 from cryptography.hazmat.primitives.asymmetric import dh 14

ImportError: cannot import name '_get_backend'

This has happened with several environments. I haven't yet figured out the exact cause - but I was hoping someone might have an idea of either the root cause or how to fix the issue (without creating a new environment).

tylercmsft avatar Jun 29 '21 20:06 tylercmsft

Hi @tylercmsft! I suspect when you've installed other libraries in the same environment, it might have upgraded some dependencies to the point that azureml-core library is not compatible with them anymore. Can you do a diff between pip list outputs on a freshly installed environment and your faulty environment?

From the error it seems that the cryptography package is the one that got upgraded, but I could be wrong.

rtanase avatar Jul 07 '21 17:07 rtanase

Closing this issue as a suggestion was provided. Should you have additional questions or face this issue again please reopen this issue or create a new one. Thanks!

cartacioS avatar Sep 17 '21 20:09 cartacioS