scikit-multilearn
“库,并且在Azure机器学习算法中使用这个python来实现我们的目标。
我们在jupyter笔记本上编写了我们的脚本,在算法中运行了我们的脚本。
当运行python脚本时,我们将获得以下错误,
ImportError跟踪(最近一次调用) in () ->1来自skmultilearn.problem_transform导入LabelPowerset 2
ImportError:没有名为“skmultilearn”的模块需要帮助,以获得相同的解决方案。
编辑:
我们遵循了上述步骤,并成功地通过了这些步骤。有关详细信息,请参阅下图。
但是,在添加DataSet列表并将其拖到机器学习实验中执行Python的第三个节点后,我们运行它并引发以下错误:
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
另外,我们在python脚本中只编写了“from skmultilearn.adapt import MLkNN”语句来检查库导入。
发布于 2017-12-20 22:16:52
ImportError:没有名为“skmultilearn”的模块
您似乎没有成功导入scikit-multilearn
包。
我为您提供以下步骤,以演示如何在skmultilearn
中导入Execute Python Script
包。
步骤1:使用virtualenv
组件在system.Please中创建一个独立的python运行时环境,如果您没有pip install virtualenv
命令,那么首先使用命令pip install virtualenv
安装它。
如果安装成功,您可以在python/Script文件中看到它。
Step2:运行逗号创建独立的python运行时环境。
步骤3:然后进入创建的目录的脚本文件夹并激活它(这个步骤很重要,不要错过)
请不要关闭此命令窗口,并在此命令窗口中使用pip install scikit-multilearn
下载外部库。
步骤4:将Lib/Step文件夹中的所有文件压缩到一个压缩包中(这里我称之为scikit-multilearn package )
步骤5:将压缩包上传到Azure Machine Learning WorkSpace DataSet。
具体步骤请参阅技术说明。
成功后,您将在DataSet列表中看到上传的包
步骤6:成功后,您将在DataSet列表中看到上传的包,将其拖到执行DataSet脚本的第三节点。
希望它能帮到你。
https://stackoverflow.com/questions/47906358
复制