0

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. python installation

This is the error I get returned azure ml error azure ml error

Here is my installation of anaconda conda installation 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

Nkma89
  • 9
  • 5

1 Answers1

0

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.

Peter Pan
  • 23,476
  • 4
  • 25
  • 43
  • Hello. Thank you for your reply. I've now tried both approaches and I haven't been able to make it work. I still get the import errors. – Nkma89 Jun 02 '17 at 11:13
  • Hello. I've tried that was my original approach as well and the error I got was: %1 is not a valid Win32 application\r\nProcess returned with non-zero exit code 1 Which is very strange since my python installation and package should have the correct version and type(see image in original post). – Nkma89 Jun 07 '17 at 08:20