1. 程式人生 > 其它 >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

技術標籤:PyTorch 基礎

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