Skip to content

Commit

Permalink
avoid "ImportError: cannot import name 'packaging' from 'pkg_resources'"
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed May 29, 2024
1 parent 1f36013 commit bea3a99
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bioimageio_collection_backoffice/validate_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ def get_pytorch_env(
"mkl !=2024.1.0", # avoid https://github.com/pytorch/pytorch/issues/123097
]
)
if pytorch_version.major == 1 and pytorch_version.minor == 10:
# avoid "ImportError: cannot import name 'packaging' from 'pkg_resources'"
# on 'import torch'
conda_env["dependencies"].append("setuptools <=70.0.0")

return conda_env


Expand Down

0 comments on commit bea3a99

Please sign in to comment.