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

Upper limit for PuLP version < 2.8.0 seems to be required #82

Open
cosimolupo opened this issue Dec 3, 2024 · 2 comments
Open

Upper limit for PuLP version < 2.8.0 seems to be required #82

cosimolupo opened this issue Dec 3, 2024 · 2 comments
Labels
bug dependencies Pull requests that update a dependency file

Comments

@cosimolupo
Copy link
Contributor

PROBLEM

When installing cobrawap via PyPI, the "undirect" PuLP dependency (i.e. not explicitly listed in the pyproject.toml file, but required by other listed dependencies) is not upper-bounded for what regards its versioning, and hence the latest version compatible with other packages is installed. As of today, the 2.9.0 version is retrieved and installed.

Unfortunately, when executing Cobrawap with Snakemake workflow manager, the following error occurs:

Traceback (most recent call last):
File "/path/to/working_dir/env_cobrawap/bin/snakemake", line 8, in <module>
sys.exit(main())
File "/path/to/working_dir/env_cobrawap/lib/python3.9/site-packages/snakemake/init.py", line 2736, in main
parser = get_argument_parser()
File "/path/to/working_dir/env_cobrawap/lib/python3.9/site-packages/snakemake/init.py", line 1607, in get_argument_parser
lp_solvers = pulp.list_solvers(onlyAvailable=True)
AttributeError: module 'pulp' has no attribute 'list_solvers'

The installed version of Snakemake is 7.32.4, as the versioning upper bound <8.0.0 is explicitly set.

PROPOSED SOLUTION

Manually downgrading PuLP to <2.8.0 solves the issue. Hence, a possible fix could to explicitly list PuLP dependency in the pyproject.toml file, and upper-bound its version to 2.7.x. When an upgrade of Snakemake version will be available (see also issue #57), then also the range allowed versions for PuLP can be reconsidered.

@cosimolupo cosimolupo added bug dependencies Pull requests that update a dependency file labels Dec 3, 2024
@rgutzen
Copy link
Collaborator

rgutzen commented Dec 3, 2024

For reference, the corresponding issue in snakemake:
snakemake/snakemake#2607

@cosimolupo
Copy link
Contributor Author

@rgutzen, indeed I found it, but forgot to link here. Thanks, it's useful to have it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants