2017-06-16 11 views

回答

1

您的描述不清楚,當您通過import humanfriendly得到錯誤時,我不知道您發生了什麼。所以我只能爲你做,只發布我如何在Azure ML中安裝humanfriendly Python包的步驟,如下所示。

  1. 根據該文件的部分Technical Notes「執行Python腳本」,我從here下載humanfriendly包。我解壓縮包(.whl文件或.tar.gz文件相同),並將其humanfriendly目錄打包爲zip文件。
  2. 然後我點擊底部的+New並選擇DATASET選項卡從本地文件上傳新數據集,如下圖所示。

    圖1.單擊鈕+New enter image description here 圖2.選擇標籤DATASET enter image description here 圖3.上傳本地文件的新數據集 enter image description here

  3. 將&拖放數據集模塊humanfriendly.zip和一個Execute Python Script模塊來連接它們並編寫Python代碼,如下所示。

enter image description here

這裏是在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 

最後,我成功地運行了實驗。


更新:我的humanfriendly zip文件結構樹。我解壓縮wheel文件,並打包humanfriendly目錄。

humanfriendly 
├── data.csv 
└── humanfriendly 
    ├── cli.py 
    ├── compat.py 
    ├── __init__.py 
    ├── prompts.py 
    ├── sphinx.py 
    ├── tables.py 
    ├── terminal.py 
    ├── tests.py 
    ├── text.py 
    └── usage.py 
+0

謝謝彼得。我遵循相同的步驟,壓縮.whl,.tar.gz和另一個.csv文件。導入人性化給出了錯誤,0085,沒有名爲humanfriendly的模塊。 –

+0

@SameekshaGupta請參閱我的文章的更新內容。 –