snakemake: AttributeError: module 'pulp' has no attribute 'list_solvers'
v8.1.1
Describe the bug
Running snakemake now throws the error: AttributeError: module 'pulp' has no attribute 'list_solvers'.
Logs
Traceback (most recent call last):
File "/.../miniforge/envs/snakemake/lib/python3.11/site-packages/snakemake/cli.py", line 2037, in main
parser, args = parse_args(argv)
^^^^^^^^^^^^^^^^
File "/.../miniforge/envs/snakemake/lib/python3.11/site-packages/snakemake/cli.py", line 1629, in parse_args
parser = get_argument_parser()
^^^^^^^^^^^^^^^^^^^^^
File "/.../miniforge/envs/snakemake/lib/python3.11/site-packages/snakemake/cli.py", line 770, in get_argument_parser
lp_solvers = pulp.list_solvers(onlyAvailable=True)
^^^^^^^^^^^^^^^^^
AttributeError: module 'pulp' has no attribute 'list_solvers'
Minimal example
Any invocation of snakemake when pulp >=2.8.0 is installed.
Additional context
pulp published a new release a few hours ago, removing deprecated API’s. This includes pulp.list_solvers, which was replaced by pulp.listSolvers.
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Reactions: 8
- Comments: 17 (7 by maintainers)
Commits related to this issue
- [python] Temp. pin pulp (Snakemake dependency). See https://github.com/snakemake/snakemake/issues/2607 — committed to ufz/ogs by bilke 6 months ago
- Pin pulp to <2.8 See https://github.com/snakemake/snakemake/issues/2607 — committed to bioconda/bioconda-recipes by corneliusroemer 6 months ago
- fix: pin pulp<2.8, required by snakemake Pulp 2.8.0 breaks snakemake. We need to pin until we upgrade snakemake to a version that is compatible with recent versions of pulp again. See https://githu... — committed to nextstrain/conda-base by corneliusroemer 6 months ago
- fix: pin pulp<2.8, required by snakemake (#53) Pulp 2.8.0 breaks snakemake. We need to pin until we upgrade snakemake to a version that is compatible with recent versions of pulp again. See https:/... — committed to nextstrain/conda-base by corneliusroemer 6 months ago
- fix: Migrate away from deprecated pulp API (#2610) ### Description The latest update of pulp 2.8.0 removed deprecated API calls still used by snakemake. This PR updates the calls to their modern... — committed to snakemake/snakemake by ebete 6 months ago
- :tv: pinning version of PuLP for now because of this issue: https://github.com/snakemake/snakemake/issues/2607 — committed to rbturnbull/orthoflow by rbturnbull 5 months ago
- Tighten dependency on snakemake dep https://github.com/snakemake/snakemake/issues/2607 Only their latest does it, but only for latest python too — committed to mih/datalad-mihextras by mih 5 months ago
- Fix GitHub action dependency error pulp 2.8 broke Snakemake 7.32, see snakemake/snakemake#2607 — committed to PathoGenOmics-Lab/VIPERA by ahmig 3 months ago
- Fix GitHub action dependency error pulp 2.8 broke Snakemake 7.32, see snakemake/snakemake#2607 — committed to PathoGenOmics-Lab/VIPERA by ahmig 3 months ago
- Add pulp as dependency Relevant issue: https://github.com/snakemake/snakemake/issues/2607 — committed to ay-amityadav/HiFiBGC by ay-amityadav 3 months ago
I just hit this on
7.32.4– Im not sure if I understand, are there plans to fix this for previous major number releases of snakemake? There are a number of breaking changes in8.*that would require a fair bit of labor to allow our pipelines to function properlypip3 install pulp==2.7.0 fixed it for me too.
@mfouesneau Downgrading pulp as suggested above has been working for me.
@smilesun Yes because the runner is using python 3.10.7:
https://github.com/marrlab/DomainLab/actions/runs/7530315974/job/20496412693#step:3:3
@smilesun snakemake 8.1.2 is available on pip, but you’ll need python >=3.11 to install it.