1. conda 新建虚拟环境,重新安装(注意:python版本不能设3.11,此处使用3.9)
conda create -n your_env_name python=3.9
2. 安装torch
方式一:
pip install torch==1.13.1+cu117 --index-url https://download.pytorch.org/whl/cu117
方式二:
在运行方式一命令后,会出现whl下载链接https://download.pytorch.org/whl/cu117/torch-1.13.1%2Bcu117-cp39-cp39-linux_x86_64.whl
可以在浏览器下载后,再运行
pip install torch-1.13.1+cu117-cp39-cp39-linux_x86_64.whl
3. 安装pytorch_lightning
pip install deepspeed==0.7.0 pytorch-lightning==1.9.2