Closed asweigart closed 9 years ago
Please check the README. Python3 support is missing at the moment. Pyscreenshot is a thin wrapper, so first the backends should be checked for Py3 compatibility.
You don't need Pyscreenshot on Windows, because PIL and Pillow can be also used for screenshots.
Done!
Awesome to hear!
I had success with pyscreenshot in python 2.7, but when I tried python 3.4 in a virtualenvironment, I got this import error:
File "project.py", line 3, in <module>
from pyscreenshot import grab, grab_to_file
File "/Users/kevin/project/venv/lib/python3.4/site-packages/pyscreenshot/__init__.py", line 4, in <module>
from pyscreenshot.loader import Loader, FailedBackendError
File "/Users/kevin/project/venv/lib/python3.4/site-packages/pyscreenshot/loader.py", line 2, in <module>
from pyscreenshot import plugins
File "/Users/kevin/project/venv/lib/python3.4/site-packages/pyscreenshot/plugins/__init__.py", line 1, in <module>
from . import gtkpixbuf
File "/Users/kevin/project/venv/lib/python3.4/site-packages/pyscreenshot/plugins/gtkpixbuf.py", line 1, in <module>
from .PIL import Image
ImportError: No module named 'pyscreenshot.plugins.PIL'
When I install the latest commit (b3629a5a138c2e5d81c44aa89a9e2fb2e52d5caa), I get a similar error (although wxscreen is introduced first):
File "project.py", line 3, in <module>
from pyscreenshot import grab, grab_to_file
File "/Users/kevin/project/venv/src/pyscreenshot/build/lib/pyscreenshot/__init__.py", line 5, in <module>
from pyscreenshot.loader import Loader, FailedBackendError
File "/Users/kevin/project/venv/src/pyscreenshot/build/lib/pyscreenshot/loader.py", line 2, in <module>
from pyscreenshot import plugins
File "/Users/kevin/project/venv/src/pyscreenshot/build/lib/pyscreenshot/plugins/__init__.py", line 5, in <module>
from pyscreenshot.plugins import wxscreen, gtkpixbuf, qtgrabwindow, scrot, \
File "/Users/kevin/project/venv/src/pyscreenshot/build/lib/pyscreenshot/plugins/wxscreen.py", line 1, in <module>
from .PIL import Image
ImportError: No module named 'pyscreenshot.plugins.PIL'
I can run from PIL import Image
by itself in my virtual environment (Pillow==2.8.1 is installed) without receiving errors.
I can't import this on Python 3.2, 3.3, or 3.4 on Windows 7. Works on 2.7 though.