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

Mac下Python3.5安装Pillow失败:six、numpy等依赖版本不兼容求助

解决Mac上Python3.5安装Pillow的问题

Hey there! I see you're running into issues installing Pillow for Python 3.5 on your Mac. Let's break down what's going wrong and fix it step by step.

问题根源

First, let's look at your error output:

Jaspers-MBP:~ jasperherrmann$ pip install pillow
Collecting pillow
Using cached Pillow-5.1.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
prompt-toolkit 1.0.15 requires six>=1.9.0, but you have six 1.4.1 which is incompatible.
pandas 0.22.0 requires numpy>=1.9.0, but ...

The key issue here is that you're using pip (which defaults to Python 2.7 on most Macs) instead of the pip version tied to Python 3.5. That's why it's downloading a Pillow package built for Python 2.7 (cp27 in the filename). The dependency conflicts for six and numpy are also from your Python 2 environment, not the Python 3.5 one you care about.

解决步骤

  • Use Python 3's pip to install Pillow
    The easiest fix is to use pip3—this is the pip executable associated with Python 3:

    pip3 install pillow
    

    If you have multiple Python 3 versions installed and want to target 3.5 specifically, run this instead to be explicit:

    python3.5 -m pip install pillow
    
  • Fix dependency conflicts (if they pop up in Python 3)
    The dependency errors you see are for your Python 2 setup, so they won't affect your Python 3.5 Pillow installation. But if you ever run into similar issues in your Python 3 environment, you can upgrade the problematic packages:

    • Upgrade six: pip3 install --upgrade six
    • Upgrade numpy: pip3 install --upgrade numpy
  • Resolve compilation errors (Mac-specific)
    Sometimes Pillow requires system libraries to compile. If you get a compile error during installation, you're probably missing the Xcode Command Line Tools. Install them with this command:

    xcode-select --install
    

    Once that's done, re-run the Pillow install command.

That should get Pillow up and running for your Python 3.5 environment!

内容的提问来源于stack exchange,提问作者Jasper Herrmann

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.21 08:20:08