安装nvidia-apex出现AttributeError: module ‘torch.distributed‘ has no attribute ‘_all_gather_base‘

首先删除apex

pip uninstall apex
rm -rf apex

重新安装低版本的

git clone https://github.com/ptrblck/apex.git
cd apex
git checkout apex_no_distributed
pip install -v --no-cache-dir ./

你可能感兴趣的:(数学建模)