Open In App

How to Install Python Pyscreenshot on Windows?

PyScreenshot is a Python module and built since the PIL ImageGrab module only supported Windows, although Pillow now supports Linux and macOS as well. Flexible backends, Wayland compatibility, occasionally superior performance, and optional sub-processing are some of the main features of PyScreenshot that make it more useful in many scenarios. Using various back-ends, the module can copy the contents of the screen to a Pillow image memory. This module also replaces the ImageGrab module. Now in most circumstances, the PyScreenshot module is no longer needed. In this article, we will see how to install PyScreenshot on Windows.

Installing PyScreenshot on Windows 

Method 1: Using pip to install PyScreenshot package on Windows



Follow the below steps to install the PyScreenshot package on Linux using pip:

Step 1: First we install the current version of Python3 in the Windows system.



Step 2: Now we check if pip and python are correctly installed or not in our system by checking their versions:

python –version

pip –version

Step 3: Upgrade pip3 to smoothly run the installation process without getting any errors.

pip install –upgrade pip

Step 4: Now we using the following command to install PyScreenshot using pip.

pip install PyScreenshot

Method 2: Using setup.py to install PyScreenshot on Windows

Follow the below steps to install the PyScreenshot package on Windows using the setup.py file:

Step 1: Download the latest source package of PyScreenshot for python3 from the website for Windows.

curl https://files.pythonhosted.org/packages/d1/75/424e89c341b54040423f55c08cf94946bc38c3fcc4cadbae05e12c09cd2a/pyscreenshot-3.0.tar.gz > pyscreenshot.tar.gz

Step 2: Now we extract the downloaded PyScreenshot package by using the following command:

tar -xzvf pyscreenshot.tar.gz

Step 3: Go inside the pyscreenshot-3.0 folder and use the following command to install the package.

cd pyscreenshot-3.0

python setup.py install

Verifying PyScreenshot installation on Windows:

Now we check if the PyScreenshot is successfully installed or not on our Windows system. To do this we import the PyScreenshot package in our Python terminal.

import pyscreenshot

Here, we doesnot get any error will importing the pyscreenshot package then which means the package is successfully installed.

Article Tags :