Skip to content
Advertisement

Poetry doesn`t use system-global Cython for compiling dependencies from source

I have a dependency package hdbscan that is compiled from source and requires a Cython to be present.

Now, the dependencies are managed through Poetry, and it seems that while compiling hdbscan it uses a dedicated virtualenv with no Cython available in it.

JavaScript

I tried installing cython3 in apt before poetry install.

I tried pip install cython before poetry install

I read through some SO questions and tried adding

JavaScript

to my pyproject.toml file, but it has no effect (maybe it is only important when the very package defined in config is built )

The only thing that works is installing cython and hdbscan in pip inside the same virtualenv or system-global, but that doesn`t sound like reasonable

Advertisement

Answer

It turned out it was the same problem as I described in https://github.com/python-poetry/poetry/issues/3744.

We use a private pypi mirror and without explicitly setting

JavaScript

poetry was unable to install a Cython in a build virualenv even though a system-wide Cython was present

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement