Python 常见问题
创建日期:2015-07-15 12:05:38

ImportError: No module named Image

I have also tried

from PIL import Image

Install Pillow instead

pip install Pillow

Install pip

To install pip, securely download

Then run the following (which may require administrator access):


If setuptools is not already installed, will install setuptools for you.

To upgrade an existing setuptools, run pip install -U setuptools.

Additionally, supports using the pip install options and the general options. Below are some examples:

Install from local copies of pip and setuptools:

python --no-index --find-links=/local/copies

Install to the user site:

python --user

Install behind a proxy:

python --proxy="[user:passwd@]proxy.server:port"

InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately [duplicate]

You only need to install the security package extras (thanks @admdrew for pointing it out)

$ pip install requests[security]

or, install them directly:

$ pip install pyopenssl ndg-httpsclient pyasn1

Requests will then automatically inject pyopenssl into urllib3

Surpress InsecureRequestWarning: Unverified HTTPS request is being made in Python2.6

import requests