You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

树莓派Raspbian Jessie下pip3安装Python包提示版本不匹配故障求助

Fixing Pillow/Numpy/Matplotlib Installation Failures on Raspbian Jessie with Python 3.6.4 (Source Install)

Hey there, let's work through this issue you're hitting. The root problem here is a combination of your older Raspbian Jessie system, end-of-life Python 3.6.4, and outdated pip that can't locate compatible package versions. Here's a step-by-step fix:

1. Upgrade pip to a version compatible with Python 3.6

Your default pip3 (from the source-installed Python 3.6.4) is likely too old to find modern-but-still-compatible package versions. Python 3.6 supports up to pip 21.3.1, so upgrade it first:

pip3 install --upgrade pip==21.3.1

2. Install critical system dependencies for compiling packages

Since you're installing both Python and these libraries from source, you need system-level build tools and libraries to avoid silent compilation failures that can look like "no matching version" errors:

sudo apt-get update
sudo apt-get install build-essential libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk libatlas-base-dev gfortran
  • libjpeg-dev/zlib1g-dev: Required for Pillow's core image processing features
  • libatlas-base-dev/gfortran: Speeds up numpy compilation and enables its numerical functionality
  • python-tk/tcl/tk dev libs: Needed for matplotlib's interactive plotting tools

3. Install compatible package versions with a reliable PyPI mirror

Newer package versions have dropped support for Python 3.6 and Raspbian Jessie, so we'll specify the last compatible releases. Use a mirror to avoid connectivity issues with the default PyPI index:

Install numpy first (matplotlib depends on it)

pip3 install numpy==1.19.5 -i https://pypi.tuna.tsinghua.edu.cn/simple

1.19.5 is the final numpy version that supports Python 3.6.

Install Pillow

pip3 install pillow==8.4.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

8.4.0 is the last Pillow release compatible with Python 3.6.

Install matplotlib

pip3 install matplotlib==3.3.4 -i https://pypi.tuna.tsinghua.edu.cn/simple

3.3.4 is the final matplotlib version that works with Python 3.6 and Raspbian Jessie.

Quick note on why this works:

Raspbian Jessie is no longer supported, so default package repos and PyPI's default index may not serve pre-built wheels or compatible source distributions for your system/Python combo. Upgrading pip ensures it can locate older, still-compatible package versions, while installing system dependencies eliminates compilation errors that often get mislabeled as "no matching version" issues.

内容的提问来源于stack exchange,提问作者Rex Low

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 07:32:43