python:ERROR: No matching distribution found for Pillow==9.1.0的处理(Python 3.6.8)

一,查看当前python和pip的版本:

查看python的版本:

[lhdop@blog ~]$ python3 --version
Python 3.6.8

查看pip的版本:

[lhdop@blog ~]$ pip3 -V
pip 21.3.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)

二,报错信息:用pip3安装一个requirements.txt

[lhdop@blog DeOldify]$ pip3 install -r requirements.txt

报错:

ERROR: Could not find a version that satisfies the requirement Pillow==9.1.0 (from versions: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 
1.6, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 2.0.0, 2.1.0, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2,
2.4.0, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.7.0, 2.8.0, 2.8.1, 2.8.2, 2.9.0, 3.0.0, 3.1.0rc1, 3.1.0, 3.1.1,
3.1.2, 3.2.0, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.4.0, 3.4.1, 3.4.2, 4.0.0, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.3.0, 5.0.0, 5.1.0, 5.2.0,
5.3.0, 5.4.0, 5.4.1, 6.0.0, 6.1.0, 6.2.0, 6.2.1, 6.2.2, 7.0.0, 7.1.0, 7.1.1, 7.1.2, 7.2.0, 8.0.0, 8.0.1, 8.1.0, 8.1.1, 8.1.2,
8.2.0, 8.3.0, 8.3.1, 8.3.2, 8.4.0) ERROR: No matching distribution found for Pillow==9.1.0 

查看requirements.txt的内容:

[lhdop@blog DeOldify]$ more requirements.txt
wandb
fastai==1.0.60
tensorboardX>=1.6
ffmpeg
ffmpeg-python
yt-dlp
jupyterlab
opencv-python>=3.3.0.10
Pillow==9.1.0
--extra-index-url https://download.pytorch.org/whl/cu113
torch==1.11.0
torchvision==0.12.0
ipywidgets

可以看到需要安装的是Pillow==9.1.0这个库

找Pillow==9.1.0这个库需要的python版本:

访问:

https://pypi.org/

搜索pillow,进入Release history->9.1.0,如图:

可以看到需要的版本是3.7及以上,如图:

 所以我们把python版本升级到3.7及以上即可

三,解决:

升级python和pip的版本即可

参见:

https://blog.imgtouch.com/index.php/2023/06/03/centos8-linux-bian-yi-sheng-ji-python-ban-ben-cong-python3/

升级完成后的安装:

Collecting Pillow==9.1.0
  Downloading Pillow-9.1.0.tar.gz (49.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━━ 37.6/49.8 MB 1.3 MB/s eta 0:00:10

可见已无问题

说明:刘宏缔的架构森林—专注it技术的博客,
网址:https://imgtouch.com
本文: https://blog.imgtouch.com/index.php/2023/06/03/python-error-no-matching-distribution-found-for-pillow-9-1/
代码: https://github.com/liuhongdi/https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: 371125307@qq.com

 四,查看升级后的版本:

查看python的版本

[lhdop@blog ~]$ python3 --version
Python 3.7.15

查看pip的版本

[lhdop@blog ~]$ pip3 -V
pip 22.3 from /usr/local/soft/python3.7.15/lib/python3.7/site-packages/pip (python 3.7)
QR:python:ERROR: No matching distribution found for Pillow==9.1.0的处理(Python 3.6.8)

python:ERROR: No matching distribution found for Pillow==9.1.0的处理(Python 3.6.8)》有1条评论

发表回复