ibayer / fastFM

fastFM: A Library for Factorization Machines
http://ibayer.github.io/fastFM
Other
1.07k stars 206 forks source link

`pip install fastFM` does not resolve dependencies on macOS #114

Closed chezou closed 7 years ago

chezou commented 7 years ago

Before installing Cython, pip install fastFM fails. This should be resolved automatically.

(venv) ~/w/ml-at-work (venv) pip install fastFM                                                                                                                          21:59:12
Collecting fastFM
  Downloading fastFM-0.2.9.tar.gz (259kB)
    100% |████████████████████████████████| 266kB 414kB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/j3/8nlft9yd55j0ccd_cp64dk280000gn/T/pip-build-zvk15zkm/fastFM/setup.py", line 3, in <module>
        from Cython.Distutils import build_ext
    ModuleNotFoundError: No module named 'Cython'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/j3/8nlft9yd55j0ccd_cp64dk280000gn/T/pip-build-zvk15zkm/fastFM/

After installing Cython and numpy manually, it is able to install via pip.

(venv) ~/w/ml-at-work (venv) pip install Cython                                                                                                                          21:59:35
Collecting Cython
  Using cached Cython-0.27.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: Cython
Successfully installed Cython-0.27.1
(venv) ~/w/ml-at-work (venv) pip install fastFM                                                                                                                          21:59:43
Collecting fastFM
  Using cached fastFM-0.2.9.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/j3/8nlft9yd55j0ccd_cp64dk280000gn/T/pip-build-6xrin9m6/fastFM/setup.py", line 4, in <module>
        import numpy
    ModuleNotFoundError: No module named 'numpy'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/j3/8nlft9yd55j0ccd_cp64dk280000gn/T/pip-build-6xrin9m6/fastFM/

(venv) ~/w/ml-at-work (venv) pip install numpy                                                                                                                           22:04:02
Collecting numpy
  Downloading numpy-1.13.3-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (4.5MB)
    100% |████████████████████████████████| 4.6MB 252kB/s
Installing collected packages: numpy
Successfully installed numpy-1.13.3
(venv) ~/w/ml-at-work (venv) pip install fastFM                                                                                                                          22:04:11
Collecting fastFM
  Using cached fastFM-0.2.9.tar.gz
Requirement already satisfied: numpy in ./venv/lib/python3.6/site-packages (from fastFM)
Collecting scikit-learn (from fastFM)
  Downloading scikit_learn-0.19.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (7.6MB)
    100% |████████████████████████████████| 7.6MB 157kB/s
Collecting scipy (from fastFM)
  Downloading scipy-0.19.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (16.2MB)
    100% |████████████████████████████████| 16.2MB 78kB/s
Building wheels for collected packages: fastFM
  Running setup.py bdist_wheel for fastFM ... done
  Stored in directory: /Users/ariga/Library/Caches/pip/wheels/3a/13/e2/2622158928ae15d3cb93553c533df4895ad635663adf502040
Successfully built fastFM
Installing collected packages: scikit-learn, scipy, fastFM
Successfully installed fastFM-0.2.9 scikit-learn-0.19.0 scipy-0.19.1
ibayer commented 7 years ago

Thanks for the report. Can you add 'cython' here https://github.com/ibayer/fastFM/blob/master/setup.py#L63 and try again? Travis-ci seems to resolve the dependencies properly on OSX.

chezou commented 7 years ago

@ibayer I made a PR on #115 Could you have a look it?