码迷,mamicode.com
首页 > 编程语言 > 详细

【Python】PIL在window64位机制上引用异常问题解决

时间:2016-06-20 15:29:00      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:

转自http://stackoverflow.com/questions/3652625/installing-setuptools-on-64-bit-windows

 

问题

 

I‘m running Python 2.7 on Windows 7 64-bit, and when I run the installer for setuptools it tells me that Python 2.7 is not installed. The specific error message is:

`Python Version 2.7 required which was not found in the registry`

My installed version of Python is:

`Python 2.7 (r27:82525, Jul  4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32`

I‘m looking at the setuptools site and it doesn‘t mention any installers for 64-bit Windows. Have I missed something or do I have to install this from source?

 

 

解答

 

Apparently (having faced related 64- and 32-bit issues on OS X) there is a bug in the Windows installer. I stumbled across this workaround, which might help - basically, you create your own registry value HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.6\InstallPath and copy over the InstallPath value from HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.6\InstallPath. See the answer below for more details.

If you do this, beware that setuptools may only install 32-bit libraries.

NOTE: the responses below offer more detail, so please read them too.

 

 

PIL使用该方法仍然报错

 

ImportError: The _imaging C module is not installed

 

最后找到一个64为的PIL,安装之后OK

http://www.qttc.net/static/file/PIL-fork-1.1.7.win-amd64-py2.7.exe

【Python】PIL在window64位机制上引用异常问题解决

标签:

原文地址:http://www.cnblogs.com/inns/p/5600480.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!