ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.torchvision 0.13.0 requires torch==1.12.0, but you have torch 2.2.1 which is incompatible.torchaudio 0.12.0 requires torch==1.12.0, but you have torch 2.2.1 which is incompatible.sagemaker 2.203.1 requires fastapi==0.95.2, but you have fastapi 0.110.0 which is incompatible.
首先,尝试更新pip,可以使用以下命令进行更新:
pip install --upgrade pip
如果更新pip后仍然存在依赖冲突,请尝试使用
pip install
命令安装特定版本的软件包,例如:pip install torch==1.12.0 pip install fastapi==0.95.2
如果您想回滚到旧版本,请先卸载当前版本,然后使用
pip install
命令安装旧版本的软件包,例如:pip uninstall torch pip install torch==1.12.0