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

如何在Windows 7系统的Python 3.6.4中安装Image库?

How to Install Pillow (Image Library) on Windows 7 for Python 3.6.4 & Use It in PyCharm

Hey there! Since you're new to Python and working with Python 3.6.4 on Windows 7 using PyCharm, let's break this down clearly. First, a quick heads-up: the "Image" library you're asking about is actually part of Pillow—the actively maintained fork of the old PIL (Python Imaging Library), which is no longer supported. So we'll be installing Pillow to access the Image module.

Step 1: Install Pillow via Command Line

If you prefer using the command prompt:

  • Open Windows Command Prompt (CMD) or PowerShell.
  • To make sure you're installing for Python 3.6 specifically, run this command:
    pip3.6 install pillow
    
    If pip3.6 doesn't work, try python -m pip install pillow—this uses the pip linked to your default Python 3.6 installation.
  • Optional: If you hit pip version errors, first upgrade pip with:
    python -m pip install --upgrade pip
    

Step 2: Install Pillow Directly in PyCharm

You can also install Pillow right within your editor, which is super convenient:

  • Open your PyCharm project.
  • Go to File > Settings (or press Ctrl+Alt+S on your keyboard).
  • In the Settings window, navigate to Project: [Your Project Name] > Python Interpreter.
  • Click the + button in the top-right corner of the interpreter list.
  • In the search bar, type pillow, select the package from the results, then click Install Package. Wait for the installation to finish.

Can Pillow (Image Module) Be Used in PyCharm?

Absolutely! Once installed, you can start using the Image module in your PyCharm code right away. Just add this import statement at the top of your script:

from PIL import Image

You can then use functions like Image.open() to load images, or other image processing features Pillow offers—PyCharm will recognize the module and even provide code hints as you work.

内容的提问来源于stack exchange,提问作者Ratnakar Mittal

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.28 09:18:38