1

My requirments.txt read

Cython
pot

I run pip install -r requirement.txt

Collecting Cython (from -r requirements.txt (line 30))
  Downloading https://files.pythonhosted.org/packages/e7/bd/59054534d09830394470c14e4dd4a2e8fa64ac14559095a044208bf34c18/Cython-0.29.7-cp35-cp35m-manylinux1_x86_64.whl (2.0MB)
    100% |################################| 2.0MB 17.7MB/s 
Collecting pot (from -r requirements.txt (line 31))
  Downloading https://files.pythonhosted.org/packages/28/4b/7aaa1f840a359f5953dd378e0237fa8faf9b0a415ff7282b7375fbe68d27/POT-0.5.1.tar.gz (720kB)
    100% |################################| 727kB 17.3MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-5w30dx4k/pot/setup.py", line 7, in <module>
        from Cython.Build import cythonize
    ImportError: No module named 'Cython'

It seems that Cython is just downloaded rather than installed, so pot still has an installation failure. When I first install Cython mannually then pot using pip, it works. Any solutions to resolve this dependencies automatically?

I am using Ubuntu 18.04 with python3 AND i do not want to use conda.

sunxd
  • 743
  • 1
  • 9
  • 24
  • Try use [pipenv](https://pipenv.readthedocs.io/en/latest/) instead for pip – Lakshan Dissanayake Apr 20 '19 at 15:38
  • 1
    Possible duplicate of [Installing chained dependency with pip and requirements.txt?](https://stackoverflow.com/questions/51657865/installing-chained-dependency-with-pip-and-requirements-txt) – phd Apr 20 '19 at 18:45
  • The problem is not that `pot` requires `Cython` but that its `setup.py` imports `Cython` before installing it. You have to install `Cython` first yourself. Without `Cython` installed `pip` cannot even run `setup.py`. – phd Apr 20 '19 at 18:46

0 Answers0