ing-bank/sparse_dot_topn

Unable to install to Heroku

farhanreynaldo opened this issue · 6 comments

Hello, thank you so much for building this library and it is wonderful.
Currently, I get the following issue after push my project to Heroku:

Collecting sparse_dot_topn==0.2.1 (from -r /tmp/build_e0636261b7d34c00288098d201b93e47/requirements.txt (line 4))
remote: Downloading https://files.pythonhosted.org/packages/45/d5/61a7e0ad871453385db289a3f44a7ab707f4f643aeb65a0f99e36d785b43/sparse_dot_topn-0.2.1.tar.gz (54kB)
remote: Complete output from command python setup.py egg_info:
remote: Traceback (most recent call last):
remote: File "", line 1, in
remote: File "/tmp/pip-build-hx1a1stj/sparse-dot-topn/setup.py", line 2, in
remote: import numpy
remote: ModuleNotFoundError: No module named 'numpy'
remote:
remote: ----------------------------------------
remote: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-hx1a1stj/sparse-dot-topn/
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to boiling-forest-90511.
remote:
To https://git.heroku.com/boiling-forest-90511.git

Could anyone please help me regarding this issue? Much appreciated.

Could you please install numpy in your Heroku environemnt first as a workaround?

It is a known issue that our package does not install the numpy depency automatically in the existing version. Hopefully, @aerdem4 or me or somebody else has time to fix it.

@farhanreynaldo, I just update the package. Now, it will install numpy, scipy and cython first. Could you please try it and let me know if it works? Thanks!

Hello @ymwdalex, thank you so much for your effort updating the package. I just tried to upgrade to the newest verstion, but I got the following error:

Collecting sparse_dot_topn
  Using cached https://files.pythonhosted.org/packages/4c/eb/c6b6b22d8df8fcfa134e969b61e498a6bf41f1f27e069edee3024ba530db/sparse_dot_topn-0.2.7.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\FR\AppData\Local\Continuum\anaconda3\envs\string-matching\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\FARHAN~1.HUT\\AppData\\Local\\Temp\\pip-install-msfj1zoi\\sparse-dot-topn\\setup.py'"'"'; __file__='"'"'C:\\Users\\FR~1.HUT\\AppData\\Local\\Temp\\pip-install-msfj1zoi\\sparse-dot-topn\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\FARHAN~1.HUT\AppData\Local\Temp\pip-install-msfj1zoi\sparse-dot-topn\pip-egg-info'
         cwd: C:\Users\FR~1.HUT\AppData\Local\Temp\pip-install-msfj1zoi\sparse-dot-topn\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\FR~1.HUT\AppData\Local\Temp\pip-install-msfj1zoi\sparse-dot-topn\setup.py", line 28, in <module>
        if os.compiler['CC'] != 'mingw32':
    AttributeError: module 'os' has no attribute 'compiler'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@farhanreynaldo thanks for your testing. Other people also reported this issue. I just update a new version 0.2.8 as a quick fix. Could you please try it again? Thanks!

Hi, @ymwdalex. It works like a charm! Thank you so much for updating the package to solve my problem. I hope you enjoy the rest of your day!

@farhanreynaldo good to hear. I will close this issue.