MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

Error - Installing SDK for Python

Open tylercmsft opened this issue 6 years ago • 4 comments

Hello - I've setup a new environment in my local Anaconda environment (Python 3.). From the terminal, I issue pip install azureml-sdk. I receive an error - azure-cli-core 2.8.0 requires msal~=1.0.0, but you'll have msal 1.5.1 which is incompatible. azure-cli-core 2.8.0 requires msal-extensions~=0.1.3, but you'll have msal-extensions 0.2.2 which is incompatible.

Not being sure if this is a benign error, I try to import azureml.core from a notebook, and receive the following error - No module named 'azure.mgmt.storage'

Is there any easy workaround for this issue?

tylercmsft avatar Oct 30 '20 21:10 tylercmsft

the easiest would probably be to make a new conda/python virtual environment and try pip install --upgrade azureml-sdk in that

it seems like you have some conflicting packages in your current Python environment. you could try to manually fix them, but i'd recommend simply using a fresh Python environment

lostmygithubaccount avatar Oct 31 '20 01:10 lostmygithubaccount

Hello, thanks for the reply. I did start with a new environment. I went ahead and added the --upgrade to the command; this resulted in the command completing without error. But, I am still getting an error in my Jupyter network when I try to run import azureml.core (No module named 'azure.mgmt.storage). I can see the azure-mgmt-storage package in the Anaconda Navigator. Not sure what do next.

tylercmsft avatar Oct 31 '20 02:10 tylercmsft

from Jupyter, can you run:

!pip freeze | grep azure

and check that you have the correct versions of azureml-core and other packages installed? If not, can you confirm your Jupyter session is using the same kernel as where you have the packages installed?

If not, can you provide more details like OS and anything else we'd need to reproduce this?

lostmygithubaccount avatar Nov 02 '20 14:11 lostmygithubaccount

Hello - Quick update. I went ahead and installed the latest Anaconda build for Windows (it comes with Python 3.8.3). After doing this, I was able to install/verify (i.e. import azureml.core) without any issues. The (prior) build of Python that was giving me problems was 3.7.x). Hopefully, that will be helpful to others, but I think we can close this out.

tylercmsft avatar Nov 02 '20 15:11 tylercmsft