(1)要注意版本对齐:
[env]pytorch_lightning和pytorch对应版本问题_pytorch-lightning版本对应-CSDN博客
(2)要注意安装的是什么
pip install pytorch-lightning has been deprecated and will stop being updated June 2023. Use pip install lightning instead.
To use the import lightning.x.y import, you need to install the lightning package: pip install lightning
If you want to use the import pytorch_lightning.x.y style, you need to install pip install pytorch-lightning
You can't mix and match them. Our documentation exclusively uses the new package imports with lightning. That's the new and recommended way.
上一篇:电脑截图,颜色变淡的问题解决