In execute python module. The line
import humanfriendly
gives error. How to fix this?
Your description is not clear, I don't know what happended when you got error via import humanfriendly as you said. So I just can do for you that only post my steps about how to install humanfriendly Python package in Azure ML, as below.
- According to the section
Technical Notesof the document "Execute Python Script", I download thehumanfriendlypackage from here. I decompressed the package (the same for either.whlfile or.tar.gzfile), and package itshumanfriendlydirectory as a zip file. Then I click the botton
+Newand select theDATASETtab to Upload a new dataset from a local file, as the figures below.Fig 1. Click the botton
+New
Fig 2. Select the tab DATASET
Fig 3. Upload a new dataset from a local file

Drag & drop the dataset module
humanfriendly.zipand aExecute Python Scriptmodule to connect them and write the Python code, as below.
Here is My testing code in the Execute Python Script.
import humanfriendly
def azureml_main(dataframe1 = None, dataframe2 = None):
user_input = '16G'
num_bytes = humanfriendly.parse_size(user_input)
print num_bytes
Finally, I ran the experiment successfully.
Update: The file structure tree of my humanfriendly zip. I decompressed the wheel file and just package the humanfriendly directory.
humanfriendly
├── data.csv
└── humanfriendly
├── cli.py
├── compat.py
├── __init__.py
├── prompts.py
├── sphinx.py
├── tables.py
├── terminal.py
├── tests.py
├── text.py
└── usage.py
来源:https://stackoverflow.com/questions/44593469/how-can-certain-python-libraries-be-imported-in-azure-mllike-the-line-import-hu



