Reputation: 31
We are trying to import "scikit-multilearn
" library in python
script and we are using this python script in Azure machine learning
algorithm to achieve our goal.
We have written our script in jupyter notebook and running our script in algorithm.
while run the python script we are getting below error,
ImportError Traceback (most recent call last) in () ----> 1 from skmultilearn.problem_transform import LabelPowerset 2
ImportError: No module named 'skmultilearn'
Need help in getting solution on the same.
Edited:
We have followed the steps mention above and through it successfully. Refer below image for details.
But after adding the DataSet List, dragging it to the third node of the Execute Python Script in Machine learning experiment, we ran it and it throws the below 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 37, in import_module
__import__(name) File "C:\temp\f99d826a21174a1a87b0dfd39e10fcb5.py", line 16, in <module>
from skmultilearn.adapt import MLkNN ImportError: No module named skmultilearn.adapt Process returned with non-zero exit code 1
---------- End of error message from Python interpreter ---------- Start time: UTC 12/21/2017 07:26:59 End time: UTC 12/21/2017 07:27:13
Also, we have written just “from skmultilearn.adapt import MLkNN” statement in the python script to check library import.
Upvotes: 0
Views: 4638
Reputation: 23782
ImportError: No module named 'skmultilearn'
It seems that you did not import scikit-multilearn
package successfully.
I offer the below steps for you to show how to import skmultilearn
package in Execute Python Script
.
Step 1 : Use the virtualenv
component to create an independent python runtime environment in your system.Please install it first with command pip install virtualenv
if you don't have it.
If you installed it successfully ,you could see it in your python/Scripts file.
Step2 : Run the commad to create independent python runtime environment.
Step 3 : Then go into the created directory's Scripts folder and activate it (this step is important , don't miss it)
Please don't close this command window and use pip install scikit-multilearn
to download external libraries in this command window.
Step 4 : Compress all of the files in the Lib/site-packages folder into a zip package (I'm calling it scikit-multilearn- package here)
Step 5 :Upload the zip package into the Azure Machine Learning WorkSpace DataSet.
specific steps please refer to the Technical Notes.
After success, you will see the uploaded package in the DataSet List
Step 6 : After success, you will see the uploaded package in the DataSet List, dragging it to the third node of the Execute Python Script.
Hope it helps you.
Upvotes: 1