Fix ModuleNotFoundError: No module named ‘ruamel’
When Importing azureml.core
If you’ve working with the Azure Machine Learning Python libraries in Visual Studio Code, you probably started with a Microsoft tutorial, which showed code like the following:
from azureml.core import Workspace
Upon seeing that seemingly innocuous code, you (at some point) install azureml.core from pypi using pip install
like you’re supposed to. Paraphrasing the command line output, you end up with something like the following.
pip install azureml.core
<....a bunch of stuff gets collected...>
Installing collected packages: azureml.core
Successfully installed azureml.core
You’re ready to (re)try your import, not realizing you’re about to fall into an abyss. What comes next doesn’t strike you as particularly difficult and if you’re like me, you hardly think anything of it.
from azureml.core import Workspace
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\ProgramData\Anaconda3\lib\site-packages\azureml\core\__init__.py", line 13, in <module>
from .workspace import Workspace
File "C:\ProgramData\Anaconda3\lib\site-packages\azureml\core\workspace.py", line 34, in <module>
from azureml.core.image import Image
File…