当前位置: 代码迷 >> 综合 >> ERROR: Could not find a version that satisfies the requirement PIL (from versions: none) ERROR: No
  详细解决方案

ERROR: Could not find a version that satisfies the requirement PIL (from versions: none) ERROR: No

热度:0   发布时间:2024-01-14 06:41:00.0

运行 PyTorch 代码时报错:

  ERROR: Could not find a version that satisfies the requirement PIL (from versions: none)
ERROR: No matching distribution found for PIL

解决方法

  • 下载 Pillow 离线安装包 .whl 文件
    • https://www.lfd.uci.edu/~gohlke/pythonlibs/#pillow
  • 使用下载的 .whl 离线安装包安装 Pillow
cd 离线安装包所在目录下
pip install Pillow-xxxxxxxxxxxxxxxxxxxxxx.whl
# 如果提示没有权限,在加参数 --user
pip install Pillow-xxxxxxxxxxxxxxxxxxxxxx.whl --user
  相关解决方案