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

运行 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

猜你喜欢

转载自blog.csdn.net/sdnuwjw/article/details/111727398