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.