0

I'm trying to import the package html5lib to Azure Machine Learning, into a Execute Python Script module. It's a similar question as here, but same solution didn't work... :/

My steps until now:

  1. I got the latest version of HTML5LIB package from the project website;
  2. Unzip tar.gz file and re-zip as .ZIP file;
  3. Upload the file in Azure Studio as a Dataset named as 'html5lib.zip'; enter image description here
  4. Add the zip file as dataset into my Experiment and connected to Script Bundle Input; enter image description here
  5. Run the following script: enter image description here

Then, I got the error:

Error 0085: The following error occurred during script evaluation, please view the output log for more information:
---------- Start of error message from Python interpreter ----------
Caught exception while executing function: Traceback (most recent call last):
File "C:\server\invokepy.py", line 189, in batch
mod = import_module(moduleName)
File "C:\pyhome\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 662, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "C:\temp\6d718116a1f549e59a5b96c5d6360911.py", line 22, in <module>
import html5lib
ImportError: No module named 'html5lib'
Process returned with non-zero exit code 1

Any idea how can I fix this?

Thanks in advance.

1 Answers1

0

This worked for me. Ran the following commands on windows command line.

mkdir html5lib
# cd into above directory
pip install html5lib --target=.
# Zip the contents of the directory html5lib.zip

This is code in Python Script Module

This is code in Python Script Module

This is screenshot of the experiment and success message after executing the experiment

This is screenshot of the experiment and success message after executing the experiment

Harish Mashetty
  • 433
  • 3
  • 13