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

URGENT: the dreaded "ModuleNotFound: Azure" error is being thrown when executing the from-import lines of code !!! #184

Open
1 of 4 tasks
markvogt opened this issue Nov 22, 2020 · 1 comment

Comments

@markvogt
Copy link

  • bug report -> please search issues before submitting
  • feature request
  • documentation issue or request
  • regression (a behavior that used to work and stopped in a new release)

### Minimal steps to reproduce
> 
START VSCode;
INSTALL Python extensions (which will INCLUDE everything to run Jupyter Notebooks in a project) in VSCode;
DEFINE a python virtual environment for your project;
INSTALL Azure CognitiveServices  "custom vision" package into that virtual environment; 
(pip install azure-cognitiveservices-vision-customvision)
COPY the following line into a notebook cell: 
       from azure.cognitiveservices.vision.customvision.training import CustomVisionTrainingClient
EXECUTE the cell 

=> RESULT: VSCode will throw the following exception: 
ModuleNotFoundError: No module named 'azure'

### Any log messages given by the failure
>ModuleNotFoundError: No module named 'azure'

### Expected/desired behavior
> the desired class is SUCCESSFULLY imported into the notebook

### OS and Version?
> Win10pro (all auto-patching CURRENT)

### Mention any other details that might be useful
> COPIED & PASTED code VERBATUM directly from the following "QuickStart" web page at docs.microsoft.com: 
https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/quickstarts/image-classification?tabs=visual-studio&pivots=programming-language-python

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.
@v-jaswel
Copy link
Contributor

Hello @markvogt,

First I sincerely apologize for my delayed reply. Also, thank you for that detailed explanation of how to reproduce the error.
So far, I have not been able to reproduce the error exactly. However, I believe that is due to something I am doing wrong on my end.

When I try to install the azure-cognitiveservices-vision-customvision package into my Python virtual environment, it is instead being installed to my user account and is thus visible everywhere. I do not know why that is happening. I agree that if the package is not visible in the environment (for example if it is not installed on my computer at all) then I see the same error message you are seeing. I will keep investigating this.

I asked around and a coworker suggested trying Anaconda (https://www.anaconda.com/products/individual) as they had never encountered problems with virtual environments there. Though I understand you are asking about Visual Studio Code and so I will keep trying to reproduce the issue there.

Thank you,
v-jaswel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants