Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of packages with build-time dependencies fail in some cases #4543

Closed
3 tasks done
mbahri opened this issue Sep 22, 2021 · 5 comments
Closed
3 tasks done

Comments

@mbahri
Copy link

mbahri commented Sep 22, 2021

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

Installation of packages that have build-time dependencies fails in some cases.

Example here: mayavi depends on numpy at build time.

$ poetry add mayavi

RuntimeError:
          Numpy is required to build Mayavi correctly, please install it first.

Pre-installing numpy:

$ poetry add numpy
$ poetry add mayavi

RuntimeError:
          Numpy is required to build Mayavi correctly, please install it first.

Other example:

$ poetry add POT

Installation crashes due to being unable to import cython

pre-installing cython:

$ poetry add cython
$ poetry add POT

Installation crashes due to being unable to import cython

This problem seems to depend on the version of python used for the project. The POT examples both work fine with Python 3.7 but crash with Python 3.9. However:

$ poetry shell
$ pip install POT

Works with Python 3.9.

@mbahri mbahri added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 22, 2021
@finswimmer
Copy link
Member

Hello @mbahri,

these packages doesn't provide a wheel in all cases. So it's necessary to build them from the sdist files. The build step happens in a temporary build environment. That's why you don't have success by installing the build-dependency manually. All these package doesn't provide a pyproject.toml containing build-system requirements according to PEP 518. Please report it to the maintainer of the projects.

There's nothing poetry can do here.

fin swimmer

@finswimmer finswimmer added Invalid Dependency Metadata and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 22, 2021
@mbahri
Copy link
Author

mbahri commented Sep 22, 2021

Hello @finswimmer

Thank you for the explanation, I will report the missing build-system requirements.

Do you have any idea why installation of POT works with poetry when using Python 3.7 but not with Python 3.9?

@finswimmer
Copy link
Member

Do you have any idea why installation of POT works with poetry when using Python 3.7 but not with Python 3.9?

It looks like POT provide wheel files for python < 3.9. So there is no need to build the package.

@mbahri
Copy link
Author

mbahri commented Sep 23, 2021

Reported the issue to both projects, thanks!

Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants