【发布时间】:2021-03-09 22:01:24
【问题描述】:
我刚刚开始设置我的第一个 Python 环境。一切都很顺利,而且似乎启用了 GPU 和所有这些好东西。
但是,我有一个问题,不知道如何解决。在获得正确的火炬安装命令后,它通知了这个问题:
Installing collected packages: torch
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.8.2 requires torch==1.7.1, but you have torch 1.8.0+cu111 which is incompatible.
Successfully installed torch-1.8.0+cu111
据我所知,torchvision 0.8.2 是最新版本。
目前环境似乎很愉快,因为所有这些命令都返回了预期的内容:
import torch
print(torch.__version__)
torch.cuda.get_device_name(0)
我见过一些人谈论“修补需求文件”或更新依赖项。但我不确定解决这个问题的最佳方法。
【问题讨论】:
标签: python pytorch torchvision