danpovey/lilcom

Bug: Fresh installation is missing numpy

janvainer opened this issue · 13 comments

Hi, when installing this package in a fresh virtual environment, the following error eccurs:

  Downloading https://files.pythonhosted.org/packages/8b/53/43f601d93e9f33da1c9d6909c1bf94390666726dbd2d18e76c377a5a1a9a/lilcom-1.1.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-szfvvzdg/lilcom/setup.py", line 26, in <module>
        import numpy
    ModuleNotFoundError: No module named 'numpy'

By installing numpy beforehand, it is then possible to install lilcom. Could this be mentioned in the README?

It is mentioned in setup.py:

install_requires=['numpy'],

It would be great if PyPI contains prebuilt wheel packages, so that pip install will install numpy automatically.

@danpovey
There is something called manylinux. See https://github.com/pypa/manylinux

In summary: a wheel compiled for manylinux can run not only on Ubuntu, Debian, but also on other
Linuxes, like CentOS, Redhat, etc. That is the meaning of many. This kind of wheel uses only
a limited set of C APIs that are supported by GLIBC on many Linux OSes.

manylinux is not used for k2, since k2 depends on PyTorch, but PyTorch does not provide a wheel for manylinux after
version 1.5.0 or 1.3.0, I cannot remember the exact version.

BTW: PyPI supports manylinux. So if you can build a manylinux wheel, it can be uploaded to PyPI so that
others can use pip install lilcom to install it instead of compiling lilcom from source.

I would like to help if you do not have time.

I just tried

pip install git+https://github.com/danpovey/lilcom

and got the same error message as the one posted by @janvainer.

I think the problem is that pip install will try to run setup.py, but setup.py assumes that
numpy has already been installed.

Maybe we need to create a requirements.txt?

I tried it locally once again with a requirements.txt inside the project but it does not help. It has the same error.