问题
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.
If you got the
xgboost
installed path from the result of installation viapip.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>'))
Try to create a clean Python virtual environment via
virtualenv
, and dopip install xgboost
orpip 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