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

Most upvoted comments

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 in 8.* that would require a fair bit of labor to allow our pipelines to function properly

pip3 install pulp==2.7.0 fixed it for me too.

@smilesun snakemake 8.1.2 is available on pip, but you’ll need python >=3.11 to install it.