Uploading xgboost to azure machine learning: %1 is not a valid Win32 application\r\nProcess returned with non-zero exit code 1

走远了吗. 提交于 2019-12-10 12:22:35

问题


I've tried to upload the xgboost python library to Azure ML, however it claim that my library is not a Win32 application. I've made sure to install the 32 bit version of the package and i'm running conda 32 bit as well. I downloaded the library from: http://www.lfd.uci.edu/~gohlke/pythonlibs/#xgboost and chose the 32 bit python 3.5 version. Python installation as below.

This is the error I get returned azure ml error

Here is my installation of anaconda conda installation

Can anyone see where I went wrong?

Best Regards

EDIT: Yes I followed the document and uploaded a zip file containing the wheel file. When I run the following it works just fine: "import pip" and "pip.main(['install', './Script Bundle/xgboost-0.6-cp35-cp35m-win32.whl'])" But when I add "import xgboost" I get this error.Import error


回答1:


According to your updated, it sounds like you had installed the xgboost wheel file successfully on Azure ML, but got an issue "ImportError: No module named xgboost" when using it.

As reference, there are two solutions which you can resolve the issue.

  1. If you got the xgboost installed path from the result of installation via pip.main method, you can try to add the code as below to append the library path dynamically.

    import os
    import sys
    sys.path.append(os.path.join(os.getcwd(), '<the installed path of xgboost>'))
    
  2. Try to create a clean Python virtual environment via virtualenv, and do pip install xgboost or pip install xgboost.whl to get the dependencies into your site-packages directory on the new python virtual environment. And zipped the site-packages folder and uploaded as the Zip file, then included the reference to the site-packages directory and successfully imported the required items.

Hope it helps.


Update:

Try to download the xgboost wheel file and its dependencies from here, and decompress them to package the files in the wheel path like xgboost-0.6.data as a zip file to upload & use it as the script bundle.



来源:https://stackoverflow.com/questions/44284183/uploading-xgboost-to-azure-machine-learning-1-is-not-a-valid-win32-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!