Python 2.7 - Importerror: No Module Named Image
Recently, I have been studying OpenCV to detect and recognize faces using C++. In order to execute source code demonstration from the OpenCV website I need to run Python to crop im
Solution 1:
You installed the 64-bit version of Python, but the 32-bit version of PIL. Either switch to the 32-bit version of Python, or you need a 64-bit version of PIL (not available that I could find). There is pillow
, a PIL-compatible replacement that might work. A 64-bit version is available here:
Solution 2:
The solution is very simple. You don't need to worry about x86 or 64 bit, all you have to do is import as follows:
fromPILimportImage
but make sure Pillow is installed. Works for me.
Solution 3:
Try to put the python(2.7) at your Windows path. Do the following steps:
- Open System Properties (Win+Pause) or My Computer and right-click then Properties
- Switch to the Advanced tab
- Click Environment Variables
- Select PATH in the System variables section
- Click Edit
- Add python's path to the end of the list (the paths are separated by semicolons).
example
C:\Windows;C:\Windows\System32;C:\Python27
Post a Comment for "Python 2.7 - Importerror: No Module Named Image"