ExaScience / smurff

Bayesian Factorization with Side Information in C++ with Python wrapper
MIT License
70 stars 14 forks source link

pip support for Python API #122

Closed BhuvaneshBhatt closed 4 years ago

BhuvaneshBhatt commented 5 years ago

Could you please add support for installing the Python API for SMURFF via pip?

tvandera commented 5 years ago

Yes, but this will take some time. Is this critical for you?

BhuvaneshBhatt commented 5 years ago

Yes, but this will take some time. Is this critical for you?

Not in the least. I'm just interested in trying it out; I'm not using it for a project (yet).

olivierjeunen commented 4 years ago

I would also appreciate support for pip, if at all possible. I've noticed that the library installation via pip install smurff works, but importing it later on gives me the following error:

Traceback (most recent call last): File "", line 1, in File "/home/ojeunen/.local/lib/python3.6/site-packages/smurff/init.py", line 1, in from .smurff import * File "/home/ojeunen/.local/lib/python3.6/site-packages/smurff/smurff.py", line 1, in from .wrapper import TrainSession ModuleNotFoundError: No module named 'smurff.wrapper'

tvandera commented 4 years ago

Hi all, I just looked into adding support for Python wheels, and things are complicated:

https://packaging.python.org/guides/installing-scientific-packages/

Is there any reason you cannot use conda?

tvandera commented 4 years ago

Hi, I've made a set of packages for Linux and MacOS. They still have to be tested further, but I'd be happy if some if you could test them out.

suchow commented 4 years ago

@tvandera Happy to help with testing on macOS 10.15.

tvandera commented 4 years ago

@suchow Cool, can you try

suchow commented 4 years ago

@tvandera

Both worked.

Log showing a successful install using pip on macOS 10.15 and Python 3.7.7: https://gist.github.com/suchow/e3729e9949f8e33f00503d0395cffeb6

And then:

(smurff) (base) ➜  test git:(release-0.15) python3 -m unittest
.....................................................................................................
----------------------------------------------------------------------
Ran 101 tests in 3.131s

OK
tvandera commented 4 years ago

Starting from v0.16.0, there are now official pip packages for smurff on linux and macOS: https://pypi.org/project/smurff