Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install pyscreenshot and Pillow, call ImageGrab.grab() to capture the desktop, then save the returned Pillow image. To capture a rectangle, pass its corner coordinates as bbox=(left, top, right, bottom). One important caveat: pyscreenshot is a wrapper around capture backends on your computer, so installing the Python package alone does not guarantee that a suitable backend is available.

Install pyscreenshot and Pillow

Use the Python interpreter and environment where you intend to run the capture script:

python3 -m pip install Pillow pyscreenshot

The project README documents this installation command. Its README lists Python 3.9, 3.10, and 3.11 as supported versions; PyPI’s pyscreenshot 3.1 metadata also displays a broader Python >=3.4 requirement. Those statements are not equivalent: the metadata minimum is not the same as the narrower version list in the README. PyPI lists pyscreenshot 3.1, whose release files were uploaded March 12, 2023 (PyPI record accessed September 29, 2026). Check the package metadata and project guidance for your environment rather than treating the broad minimum as a current tested-version guarantee.

Capture and save the full screen

This is the project’s basic documented example:

import pyscreenshot as ImageGrab

im = ImageGrab.grab()
im.save("screenshot.png")

grab() returns an image held in memory. The returned image’s save() method writes it to the path you provide; Pillow handles the image representation and saving. The output extension in this example is PNG. For other image operations and format details, consult Pillow’s documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Capture a rectangular area

Pass bbox as a four-item tuple in the order (left, top, right, bottom). The coordinates describe the rectangle’s two corners in screen coordinates:

import pyscreenshot as ImageGrab

im = ImageGrab.grab(bbox=(10, 10, 510, 510))
im.save("region.png")

This captures the region from the top-left point (10, 10) to the bottom-right point (510, 510), then saves the result as region.png. If the crop is misplaced or its dimensions are not what you expected, check the coordinate origin and rectangle values for your desktop and adjust the four values. Keep the order left, top, right, bottom; swapping corners can describe the wrong area.

Choose a backend when the default does not work

pyscreenshot does not implement every capture path itself. It offers one interface to available backends, which can include Python libraries, desktop D-Bus services, and command-line utilities. The README lists integrations such as Pillow, MSS, xdg-desktop-portal Screenshot, GNOME Shell Screenshot, scrot, maim, ImageMagick, PyQt5, PySide2, wxPython, Grim, Quartz, and macOS screencapture. These are possible integration routes, not a promise that each is installed or usable on every machine.

You can request a backend by name, for example:

import pyscreenshot as ImageGrab

im = ImageGrab.grab(backend="scrot")
im.save("screenshot.png")

That call only works if the named backend and its requirements are available in the current environment. If it fails, install or configure the backend appropriate to your operating system and desktop session, or try a backend that is already available. Do not assume that a backend name alone installs the corresponding system utility.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Wayland desktops

The project documents several Wayland capture routes: the xdg-desktop-portal Screenshot D-Bus service, GNOME Shell Screenshot D-Bus, and Grim on compositors that support wlr-screencopy-unstable-v1. The README says Grim works with Sway but not GNOME or KDE. Where both Wayland and X are available, the project prefers Wayland because Xwayland cannot be used for screenshot capture.

Some of these routes can be visible to the person at the desktop. The README notes that portal capture can show a confirmation dialog, KDE Wayland may show a notification, and GNOME may show a screenshot flash effect. Consider those behaviors before using a capture method in an unattended workflow; a desktop prompt can require interaction.

Pointer and interactive capture limits

The project says its capture is not interactive and the mouse pointer is not visible. Do not rely on pyscreenshot to let a user select an area during capture or to include a pointer in the resulting image. The README’s limitation is project-level guidance; a custom backend may behave differently, so check that backend’s own documentation if pointer behavior matters.

When to use Pillow ImageGrab instead

The pyscreenshot README opens with the recommendation “TL;DR: Use Pillow.” It describes pyscreenshot as obsolete for most cases because Pillow’s ImageGrab now supports Linux and macOS as well as Windows. The project identifies possible reasons to choose pyscreenshot instead: a common interface across flexible backends, a particular Wayland route, performance in some situations, or subprocess isolation. PyPI’s pyscreenshot 3.1 description gives the same broad framing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

For a simple screen grab, try Pillow’s direct interface first if it fits your platform and requirements. Choose pyscreenshot when its backend options or process behavior solve a specific problem you have. Neither choice can be declared faster or more reliable on every computer from the project’s available evidence: capture depends on the system, session, and backend.

Speed and subprocess isolation

The README provides an example of requesting MSS while disabling child-process execution:

import pyscreenshot as ImageGrab

im = ImageGrab.grab(backend="mss", childprocess=False)
im.save("screenshot.png")

The project describes disabling child processes as a possible speed-oriented setting, but says subprocess mode is safer and that turning it off can cause problems. Use this option only if the named backend is available and you have a reason to trade isolation for speed. Test it in the actual environment and workload rather than treating it as a general optimization.

The README’s timing examples are observations from Ubuntu 22.04 X11 with specific dependency versions, including pyscreenshot 3.1, Pillow 9.0.1, and MSS 7.0.1. They are not universal benchmarks or a current comparison across systems. The project says performance is not its main target and recommends benchmarking the available settings in your own environment if speed matters.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Or skip the browser setup

pyscreenshot captures the desktop where Python runs. If what you need is a screenshot of a public webpage from its URL, you do not need to install or operate a local browser capture stack. ScreenshotNeo is a website screenshot API and MCP server; it is a different tool for webpage captures, not a replacement for capturing your local desktop.

One GET request can return an image or PDF. For example, save a webpage capture with cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options and response details. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The Free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for the free plan.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common capture failures

The import fails

Confirm that installation completed in the same Python environment used to run the script. Install both documented packages with that interpreter’s python3 -m pip, then rerun the script from that environment. If you use a virtual environment, activate it before installing and running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

pyscreenshot installs, but capture fails

The wrapper needs a usable capture backend. Check which backend the error names and whether its Python dependency, desktop service, or command-line utility is installed and accessible. Try an available backend explicitly if the default selection does not work. The package installation itself does not ensure that system-level components are present.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

A Wayland capture waits for a response or cannot run unattended

Check which Wayland route is in use. The portal route may require confirmation, and the project documents desktop-specific notifications or visual effects. If unattended capture is a requirement, verify that the selected route and compositor allow that workflow; do not assume every Wayland backend is prompt-free.

The requested backend is unavailable

A backend name such as scrot, mss, or grim identifies a route, not a bundled dependency. Install the appropriate backend and verify that it supports the current operating system and desktop session. For Grim, the project specifically identifies Sway support and says GNOME and KDE are not supported.

The image is cropped incorrectly

Check that bbox is ordered as (left, top, right, bottom), and confirm the values against the screen coordinate space used by the target machine. Start with a small known rectangle, save it, and adjust the corner values before using the crop in a larger script.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Disabling child processes causes instability

Restore the default process behavior by omitting childprocess=False. The project describes subprocess use as the safer option and warns that disabling it can cause problems; only keep it disabled if testing shows it is stable for your specific backend and workload.

Practical checklist before relying on a script

  • Install Pillow and pyscreenshot in the interpreter environment that will run the script.
  • Verify a working capture backend on the target OS and desktop session.
  • Test both the normal full-screen call and the exact crop coordinates you intend to use.
  • Account for Wayland prompts, notifications, or visual effects where applicable.
  • Do not depend on interactive selection or pointer inclusion based on pyscreenshot’s documented behavior.
  • Benchmark backend and subprocess choices on your own machine if capture time is important.

Frequently Asked Questions

Does pyscreenshot take a screenshot of a webpage just from its URL?

No. Its documented grab() workflow captures the computer’s screen or a screen region. A URL-based webpage capture is a separate task that needs a browser-based service or another webpage-rendering method.

Will the script show the mouse cursor in the saved image?

The pyscreenshot project says its capture is not interactive and the pointer is not visible. If cursor visibility is required, check the behavior of the specific backend you plan to use rather than assuming pyscreenshot includes it.

Can I use the README’s timing figures to predict my computer’s capture speed?

No. The published examples are tied to Ubuntu 22.04 X11 and specific dependency versions, so they are observations for that setup rather than a general performance guarantee.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.