-2

I have a basic Python script that I'm executing in an Python Azure Runbook. I need to install the PyYAML package but I don't know how to do it. I have installed other packages ok as when I download from PyPI they come with the name format *****-py3-none-any.whl. I've tried several of the packages in PyPI for PyYAML however they all seem OS specific and they won't install in the Azure Automation account as I get the following error...

Runtime version 3.8 Error Orchestrator.Activities.PythonPackageExtractException: Error while extractinig Python package: Unexpected file structure in .whl file for python package PyYAML. It is likely that the package is for an unsupported platform. at Orchestrator.Activities.SetModuleActivity.ExecuteInternal(CodeActivityContext context, Byte[] moduleContent, String moduleName, ModuleLanguage moduleLanguage, Guid moduleVersionId, String modulePath) at Orchestrator.Activities.SetModuleActivity.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation).

Does PyYAML not support Azure Runbooks, or is there another version somewhere that would work as none of the ones here...

https://pypi.org/project/PyYAML/6.0/#files

...would seem to fit?

Any help would be greatly appreciated :(

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 20 '23 at 21:50

1 Answers1

-1

In case any other noobs find this in the future, I sorted this by making the Python runbook install PyYAML by running this command in a separate runbook:-

import pip pip.main(['install', 'PyYAML'])

This then gave me the version that worked, which for the record was...

PyYAML-6.0-cp38-cp38-win_amd64.whl