Error when running RGFClassifier I recently tried to run Regularized Greedy Forest algorithm (rgf Classifier) from this package https://pypi.python.org/pypi/rgf_python.

I did run pip install rgf_python, but when I tried to run the example this error pops out in spyder:

  File "C:\Users\me\Anaconda3\lib\site-packages\rgf\sklearn.py", line 111, in &lt;module&gt;
    "config flag 'exe_location' to RGF execution file.".format(_EXE_PATH))

Exception: C:\Users\me\rgf.exe is not executable file. Please set config flag 'exe_location' to RGF execution file.


What should I change in order for config the flag 'exe_location'? May sound beginner but can't find it anywhere.
I had the same problem, and I'm not proud of the very "hacky" solution, but the bottom line is it's working now. I'm working on a Mac, so I'm sure your solution will be a bit different.

The normal pip install wasn't working for me, so to install I did...

git clone https://github.com/fukatani/rgf_python.git
cd rgf_python
python setup.py install


I was then able to find the executable file your error message is complaining about in the new rgf_python directory, specifically...

rgf_python/include/rgf/bin/rgf


From there, I tried to change the exe_location in my .rgfrc file to point to the above file, but it didn't work so I went to the /site-packages/rgf/sklearn.py file mentioned at the top of your error message and changed a line in the "_get_paths" function.

For me it was line 64/66. I suspect yours may be 54/56 if you're on Windows. I commented out the old declaration of "exe" and changed it to point to the rgf executable file I found earlier.

I realize how messy this is, so I hope someone can find a better solution, but in the meantime, this did the trick for me. Good luck, and let me know if you have any questions.