N3PDF / banana

Benchmarking AgaiNst Apfel aNd Anything
https://banana-hep.readthedocs.io
GNU General Public License v3.0
2 stars 1 forks source link

Problems in installing banana with poetry #27

Open niclaurenti opened 2 years ago

niclaurenti commented 2 years ago

I had problems during the installation of banana with poetry: when I run the poetry install command it crashes on the installation of pendulum. For the moment I solved it running

poetry run pip install setuptools==62.4.0
poetry install -E mark
felixhekhorn commented 2 years ago

Can you please give the exact error? and there is no "mark" in banana - so I'm guessing you were trying to install in eko?

felixhekhorn commented 2 years ago

@AleCandido: the last true commit to main was https://github.com/N3PDF/banana/commit/db3b106deb515da08e6d291e43cbd3e1e511f301 which should have run poetry update - still if I clone and run poetry install I get Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.

However, the command succeeds ...

alecandido commented 2 years ago

Wait a moment @felixhekhorn

This a solved problem, @niclaurenti told me and I provided a work around. It is already documented in Pendulum, and it's coming (through Poetry) directly from pip. But I told @niclaurenti to add also the reference to the issue and the workaround.

alecandido commented 2 years ago

However, let's go in order.

The problem

The problem arise (at least for fresh environment, Python 3.10) when you try to install eko[mark], that depends on banana and thus on Pendulum. To reproduce:

  1. clone EKO from scratch, or just remove existing Poetry environment
  2. run poetry install -E mark

The explanation

It is a known problem, due to the presence of a system installation of an old version of setuptools, that is not updated by Poetry (not managed by it in the first place), but used to build packages the moment a user-side build is needed (because no suitable wheel is available).

Reference issue in Pendulum: https://github.com/sdispater/pendulum/issues/619 referring https://github.com/pypa/pip/issues/6264#issuecomment-685230919

The workaround

As found in https://github.com/sdispater/pendulum/issues/619#issuecomment-1157908759 it is sufficient to run:

poetry run pip install setuptools==62.4.0

before the incriminated poetry install.