ibayer / fastFM

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

CircleCI tests fail when fastFM is in requirements.txt #124

Closed jilljenn closed 6 years ago

jilljenn commented 6 years ago

Hi,

For some reason, under Python 3.5.2, when Cython and fastFM are in requirements.txt I still get an error on CircleCI (which runs on a Linux):

Collecting Cython (from -r requirements/./production.txt (line 13))
  Downloading Cython-0.27.3-cp35-cp35m-manylinux1_x86_64.whl (3.0MB)
    100% |████████████████████████████████| 3.0MB 492kB/s 
Collecting fastFM (from -r requirements/./production.txt (line 14))
  Downloading fastFM-0.2.10.tar.gz (1.6MB)
    100% |████████████████████████████████| 1.6MB 937kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-bfym_ieb/fastFM/setup.py", line 3, in <module>
        from Cython.Distutils import build_ext
    ImportError: No module named 'Cython'

So I tried to install requirements.txt before pip install fastFM, and then I get a GCC error, while python-dev and libopenblas-dev are installed.

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -IfastFM/ -IfastFM-core/include/ -IfastFM-core/externals/CXSparse/Include/ -I/home/ubuntu/virtualenvs/venv-3.5.2/lib/python3.5/site-packages/numpy/core/include -I/home/ubuntu/virtualenvs/venv-3.5.2/include -I/opt/circleci/python/3.5.2/include/python3.5m -c fastFM/ffm.c -o build/temp.linux-x86_64-3.5/fastFM/ffm.o
  In file included from /home/ubuntu/virtualenvs/venv-3.5.2/lib/python3.5/site-packages/numpy/core/include/numpy/ndarraytypes.h:1788:0,
                   from /home/ubuntu/virtualenvs/venv-3.5.2/lib/python3.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                   from /home/ubuntu/virtualenvs/venv-3.5.2/lib/python3.5/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from fastFM/ffm.c:528:
  /home/ubuntu/virtualenvs/venv-3.5.2/lib/python3.5/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it by " \
    ^
  gcc -pthread -shared -L/opt/circleci/python/3.5.2/lib build/temp.linux-x86_64-3.5/fastFM/ffm.o -LfastFM/ -LfastFM-core/bin/ -lm -lfastfm -o build/lib.linux-x86_64-3.5/ffm.cpython-35m-x86_64-linux-gnu.so
  /usr/bin/ld: fastFM-core/bin//libfastfm.a(ffm_utils.o): unrecognized relocation (0x2a) in section `.text'
  /usr/bin/ld: final link failed: Bad value
  collect2: error: ld returned 1 exit status
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for fastFM
ibayer commented 6 years ago

Can you reproduce this issue on a setting without CircleCI? I'll probably upload linux binaries some time soon, that might help.

jilljenn commented 6 years ago

Thanks for your reactivity. On my Mac, it works, but maybe there are some missing dependencies (in the repo) that I have on my Mac.

Have you tried an install from a fresh VM, or a Docker?

ibayer commented 6 years ago

I made a linux binary release yesterday does this help? just pip install

jilljenn commented 6 years ago

It did work! Thanks!