@KT Thanks for the question. Could you please share link to the code to check on this. Here is the doc for supported python packages.
There’s a trouble shooting doc: Troubleshoot designer module errors - Azure Machine Learning | Microsoft Learn
Module not found when custom python package installed via shell script
Hi All,
I am using Azure ML designer to run zipped python scripts. But the code is complaining about the 'No module Found' error.
From the main python script where azureml_main() is present I am calling a bash script using following call:
proc = call(["bash", "Script Bundle/setup.sh"])
# /bin/bash
echo "Hello World !!!"
pip install -r 'Script Bundle/requirement.txt'
python account_test.py
#account_test.py
import os
import json
import xmltodict
from bankaccount import BankAccount
my_account = BankAccount(50)
my_account.withdraw(5)
print (my_account.balance, my_account.overdrawn())
with open('Script Bundle/person.json') as f:
data = json.load(f)
print(data)
with open('Script Bundle/sample.xml') as fd:
doc = xmltodict.parse(fd.read())
print(doc)
Inside the bash script I am installing the custom module using pip and immediately calling an entry python script(python account_test.py) to call a chain of scripts. But the code is unable to find the module(xmltodict) and is failing eventually.
My assumption is the module is getting installed in a separate process and main process do not have access to that. But I tried with calling the python file from same shell script, still it is not working.
Looking for your help.
Azure Machine Learning
1 answer
Sort by: Most helpful
-
Ramr-msft 17,826 Reputation points
2021-02-08T13:46:57.837+00:00