from batchgenerators.transforms import ComposeImportError: cannot import name ‘Compose‘ from ‘batch

完整报错:

from batchgenerators.transforms import Compose
ImportError: cannot import name 'Compose' from 'batchgenerators.transforms' (/home/shiya.xu/anaconda3/envs/pyxsy/lib/python3.10/site-packages/batchgenerators/transforms/__init__.py)

from batchgenerators.transforms import ComposeImportError: cannot import name ‘Compose‘ from ‘batch_第1张图片关于batchgenerators我安装的版本

from batchgenerators.transforms import ComposeImportError: cannot import name ‘Compose‘ from ‘batch_第2张图片解决方法就是不要安装0.24

换用0.21版本

pip uninstall batchgenerators
pip install batchgenerators==0.21

 

 

参考:周学长您好,我在配置环境中发现个小坑想提醒大家 · Issue #72 · MrGiovanni/UNetPlusPlus · GitHub

你可能感兴趣的:(python,开发语言)