torch环境冲突:AttributeError: module ‘torch.library‘ has no attribute ‘register_fake‘

如果torch版本冲突问题复杂,可以尝试清理环境并重新安装所有依赖项:

pip uninstall torch torchaudio torchvision
 pip install torch==2.3.1 torchaudio==2.3.1 torchvision==0.18.1 -f https://mirrors.tuna.tsinghua.edu.cn/pytorch-wheels/torch_stable.html

你可能感兴趣的:(深度学习速通系列,深度学习基础动手,Ubuntu,深度学习,机器学习,pytorch)