When PIL is installed 64-bit in win7 python2.7, a message indicating JPEG support not available is displayed.

Source: Internet
Author: User
Tags vc9

When PIL is installed 64-bit in python2.7 under win7, a message is displayed, such as JPEG support not available, indicating that the image Connection Library is unavailable,

The error message returned when the error message does not exist in 32-Bit mode. The solution is as follows:

1. Download PIL source code http://www.pythonware.com/products/pil/

Decompress the package to d: \ temp \ PIL.

2. Solve JPEG support

Download idea

Decompress the package to d: \ temp \ jpeg.

Modify jconfig. vc to jconfig. h and makefile. vc to makefile.

Prompt for running Visual Studio 2008x64 Win64 command

Enter the d: \ temp \ jpeg directory, and then enter nmake clean all

Copy all the files under d: \ temp \ jpeg to the Directory d: \ temp \ PIL \ lib \ jpeg (created under the directory)

In d: \ temp \ PIL \ setup. py, set cmd_root to cmd_root = "D:/test/PIL/lib/jpeg"

Then run cmd to enter the d: \ temp \ PIL directory and run python setup. py build.

3. Solve PNG support

Download the latest source code from http://zlib.net/to d:?temp=zlib

Find the d: \ test \ zlib \ contrib \ vstudio \ vc9 \ zlibstat. vcproj file, open it in notepad, replace all zlib_winapis; empty

Double-click d: \ test \ zlib \ contrib \ vstudio \ vc9 \ zlibvc. sln to open

Choose "generate"> "Configuration Manager"> "Active solution platform"> "add x64" from the drop-down list.

Compile the solution

Prompt for running Visual Studio 2008x64 Win64 command

Enter d: \ temp \ zlib and enter nmake-f win32 \ Makefile. msc AS = ml64 LOC = "-DASMV-DASMINF-I." OBJA = "inffasx64.obj gvmat64.obj inffas8664.obj"

Copy all files under d: \ temp \ zlib and d: \ test \ zlib \ contrib \ vstudio \ vc9 \ x64 \ Release to d: \ temp \ PIL \ lib \ zlib directory

Modify ZLIB_ROOT in d: \ temp \ PIL \ setup. py to ZLIB_ROOT = "D:/test/PIL/lib/zlib"

Then run cmd to enter the d: \ temp \ PIL directory and run python setup. py build.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.