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.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

If you see “ImageGrab permission denied” or “PIL ImageGrab permission denied,” first identify your operating system and which function failed: ImageGrab.grab() captures the screen, while ImageGrab.grabclipboard() reads image data from the clipboard. They have different causes and fixes. On macOS, check the screen-recording permission for the app running Python; on Linux, check the active display session, Pillow’s XCB support, or the clipboard utility required for the operation. On Windows, the exception and runtime context matter: there is no universal permission switch established by Pillow’s documentation.

Start by identifying the operation and the exact error

Before changing settings, save the full traceback and answer two questions:

  • Which operating system and Pillow version are running?
  • Does the failing line call ImageGrab.grab() for a screen capture, or ImageGrab.grabclipboard() for clipboard content?

These are separate operations in Pillow’s ImageGrab API. A macOS screen-recording authorization issue does not explain every clipboard failure, and an unavailable Linux display is not the same problem as a missing clipboard command. Record the exact exception type and message rather than relying on the phrase “permission denied” alone.

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

Also note where the process runs: a terminal, IDE, notebook, packaged application, service, or remote session. That host context can change which permission control or display session applies. Pillow’s stable ImageGrab documentation identifies version 12.3.0 as the current release in the documentation reviewed here; check the documentation for the version actually installed, since behavior and available parameters can vary.

#1 Best Overall
Debut Video Capture Software to Record from a Webcam, Computer Screen or Device [Download]
  • Capture video directly to your hard drive
  • Record video in many video file formats including avi, wmv, flv, mpg, 3gp, mp4, mov and more
  • Capture video from a webcam, network IP camera or a video input device (e.g.: VHS recorder)
  • Screen capture software records the entire screen, a single window or any selected portion
  • Digital zoom with the mouse scroll wheel, and drag to scroll the recording window

Run a minimal test in the same Python environment

Try the screen call and clipboard call separately, in the same process host where the failure occurs. Do not combine them into one test: the first failing operation is the useful clue.

from PIL import ImageGrab

# Screen capture:
image = ImageGrab.grab()
print(image.size, image.mode)

# Clipboard capture (test separately):
clipboard_image = ImageGrab.grabclipboard()
print(type(clipboard_image), clipboard_image)

For a screen capture, a successful result is an image object whose size and mode print. A clipboard call can legitimately return None when there is no image on the clipboard; Windows may also return filenames. Those results are not, by themselves, permission exceptions. Once the minimal call works, add back any bounding box or other optional parameters one at a time.

How do I give Python screen-recording permission on macOS?

For ImageGrab.grab(), open Apple menu > System Settings > Privacy & Security > Screen & System Audio Recording. Turn on the relevant app in the list, or use the add control to select it. Apple’s guide, “Control access to screen and system audio recording on Mac,” gives the route through System Settings and the app-level controls.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
VGA Capture Card, VGA to USB Capture Device with Mic Input Support HD 720P Video for Gaming, Streaming, Teaching, Video Conference, Live Broadcasting
  • 【HD VGA Video Capture Card】 Video Capture Card supports VGA input, capture video up to 1720P 30fps with no delay. A great external capture device for Laptop, PC, set-top box, blue-ray, etc
  • 【Patent design VGA capture card】 This capture card offers VGA to USB 2.0 output, Enjoy recording videos from games, broadcast, live artwork etc. Also a great video capture device for you to connect with laptop or tablet to share content in conference rooms or online meetings.
  • 【Plug and Play】 VGA capture card does not need to install a driver, work with most video software and cameras on Windows, Mac, Linux, Android and other operation systems. Also Compatible with a variety of USB3.0 chipsets (Intel, Renesas, ASMedia, Fresco Logic), UVC and UAC standard. This capture card switch won't use up too much CPU.
  • 【Portable and Lightweight】Size: 2.3inx1.9inx0.7in, VGA game video capture device is stylish and compact. Small size capture card for you to carry, no problem for outdoor and indoor live streaming, an ideal capture device for video recording.
  • 【Worry Free Warranty】 VGA capture card x1, USB cable(male to male) x1, VGA cable(male to male) x1, Mic cable(male to male) x1. We support free lifetime technical support and 1 Year Free Replacement Warranty. Please feel free contact us if you need any help.
  1. Identify the application that launches the Python process. If you run Python from Terminal, an IDE, or another host, look for that host app in the permission list; do not enable an unrelated application.
  2. In System Settings, open Privacy & Security, then Screen & System Audio Recording.
  3. Enable the relevant listed app or add the host app if needed.
  4. Retry the minimal ImageGrab.grab() test from that same host.

This setting concerns screen capture. It is not a general fix for grabclipboard(), Linux display failures, or arbitrary Python exceptions. Apple can change interface labels over time, so if the route differs on your macOS release, search System Settings for the screen-recording control.

Why does ImageGrab fail on Linux?

Linux screen capture depends on a usable graphical display route. Pillow’s ImageGrab documentation describes use of the default X11 display when xdisplay=None. It also describes fallback attempts to use gnome-screenshot, grim, or spectacle when the default X11 display does not return a snapshot and an applicable utility is installed. These paths do not make screen capture available in every headless, remote, or misconfigured session.

For a screen capture, check the display session

  • Confirm that the Python process is running in the graphical session you intend to capture, rather than in a different user session or a noninteractive service.
  • Check whether the process has the expected DISPLAY value for an X11 session and whether the session is instead using Wayland. A mismatch between the process and the active display context can prevent capture.
  • Check that Pillow has XCB support. Pillow’s implementation can raise an OSError stating that it was built without XCB support; changing file permissions will not add that build capability.
  • If Pillow’s documented fallback path is relevant to your session, check whether one of the listed utilities is installed and usable there. Their presence does not repair an inaccessible display session.

On versions of Pillow whose API supports it, xdisplay can be used to specify an X display; consult the documentation for your installed release before changing that parameter. Start with the default minimal call, then investigate the display value or optional parameters only if the traceback points in that direction.

For clipboard capture, check the separate dependency

Pillow’s Linux documentation says grabclipboard() requires wl-paste or xclip. If neither suitable utility is available, the implementation raises NotImplementedError with a dependency message. Install and configure the appropriate utility for the desktop environment, then retry the clipboard test. This is a clipboard dependency, not a fix for a screen-capture display failure.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Does Windows have an ImageGrab permission setting?

Pillow documents ImageGrab support on Windows, but the official sources reviewed do not establish a universal Windows “ImageGrab permission” switch or a one-step remedy. Use the traceback and runtime context to narrow the problem instead of applying a macOS instruction to Windows.

  • Confirm whether the failing call is screen capture or clipboard capture.
  • Record the exact exception and the Python/Pillow environment.
  • Note whether the process runs in a service, remote session, packaged app, IDE, or other noninteractive context.
  • Retry a no-argument minimal call in the same process host to see whether the failure is in the basic operation or an optional parameter.

If the basic call still fails, include those details when seeking help; “permission denied” alone does not identify a specific Windows cause.

Use a browser screenshot API only for browser pages

If the task is to capture a website rather than the local desktop, a browser screenshot API is a different approach from Pillow ImageGrab. It cannot grant Python access to a local screen or clipboard, so it is not a fix for a local capture permission error. ScreenshotNeo is a website screenshot API and MCP server for developers; it returns a screenshot or PDF of a URL rather than reading the machine’s screen.

Or skip the browser setup

For a website URL, ScreenshotNeo takes a screenshot with one GET request. See the ScreenshotNeo API documentation for parameters and response details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python alternative:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, and failed loads are not billed. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. 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 by failure class

Symptom or clue Likely direction Next step
macOS screen capture is denied or unavailable App-level screen-recording authorization Enable the host app under Screen & System Audio Recording, then retry in that host.
Linux screen capture cannot obtain a snapshot Display session, X11/XCB support, or available fallback utility Check the active graphical session, process display context, Pillow build capability, and applicable screenshot utility.
Linux clipboard call raises NotImplementedError with a dependency message Missing clipboard utility Check for wl-paste or xclip in the environment running Python.
Clipboard call returns None No image data available on the clipboard Copy an image and retry; do not treat None alone as a permission failure.
Windows error without an obvious permission control Unspecified runtime or operation-specific failure Use the exact exception, call, process host, and session context to diagnose; no universal switch is established here.
Minimal call works but customized call fails Optional argument or capture bounds Restore parameters one by one and consult the installed Pillow version’s API documentation.

What to include when asking for help

Share enough detail for someone to distinguish authorization from display and dependency problems. Remove secrets and private screen content before posting logs.

  • Full traceback and exact exception text.
  • Operating system/version, Python version, and Pillow version.
  • The specific call: grab() or grabclipboard(), including optional arguments.
  • Where Python runs: terminal, IDE, notebook, service, packaged app, or remote session.
  • For Linux, whether the session is X11 or Wayland, relevant display context, and whether the traceback mentions XCB or a clipboard dependency.
  • For macOS, which host application launches Python and whether it appears in the screen-recording privacy list.

Frequently Asked Questions

Is “PIL” different from Pillow in this error?

Pillow is the maintained imaging package imported through the PIL namespace, so from PIL import ImageGrab is the expected import form.

Should I change file permissions with chmod to fix this?

Not without an error that specifically identifies a filesystem access problem. macOS screen authorization, Linux display access, and missing clipboard utilities are different issues from file ownership or mode bits.

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.