Python Pil Image Module Importerror: No Module Named Pil, No Module Named Image
Solution 1:
@stwhite I suggest you to use virtualenv (http://www.virtualenv.org/en/latest/index.html) for multiple projects to live in their own environments.
Usefull wrapper for virtualenv http://www.doughellmann.com/projects/virtualenvwrapper/
My own projects live in their own virtualenvs and its really awesome.
Here is the question about creating virtualenv with specific python version Use different Python version with virtualenv
Note May be you'll have problems when installing PIL into the virtualenv
Solution
First install XCode with gcc support,
deactivate <virtualenv_name>
cd ../ (virtualenvs root)
pip install -E <virtualenv_name/> PIL
Hope this will work for you too,
Thanks,
Sultan
Solution 2:
PHP is running the wrong version of Python. Specify the full path to the python
executable.
Solution 3:
Make sure your PYTHONPATH is correct when running via exec() call.
Import sys
print sys.path
sys.path.append ("<path of Image>")
You can also load the module dynamically, at runtime to ensure its available, provided its available in the standard location.
Post a Comment for "Python Pil Image Module Importerror: No Module Named Pil, No Module Named Image"