How to Install pyperclip in Python on MacOS?
Last Updated :
26 Oct, 2021
In this article, we will learn how to install pyperclip in Python on MacOS.
Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with both Python 2 and 3. This module was created to enable cross-platform copy-pasting in Python which was earlier absent. The pyperclip module has copy() and paste() functions that can send a text to and receive a text from your computer’s clipboard.
Installing pyperclip on MacOS:
Method 1: Using pip to install pyperclip Package
Follow the below steps to install the pyperclip package on macOS using pip:
Step 1: Install the latest Python3 in MacOS
Step 2: Check if pip3 and python3 are correctly installed.
python3 --version
pip3 --version
Step 3: Upgrade your pip to avoid errors during installation.
pip3 install --upgrade pip
Step 4: Enter the following command to install pyperclip using pip3.
pip3 install pyperclip

Method 2: Using setup.py to install pyperclip
Follow the below steps to install the pyperclip pyperclip on macOS using the setup.py file:
Step 1: Download the latest source package of pyperclip for python3 from here.
curl https://files.pythonhosted.org/packages/a7/2c/4c64579f847bd5d539803c8b909e54ba087a79d01bb3aba433a95879a6c5/pyperclip-1.8.2.tar.gz > pyperclip.tar.gz
Step 2: Extract the downloaded package using the following command.
tar -xzvf pyperclip.tar.gz
Step 3: Go inside the folder and Enter the following command to install the package.
Note: You must have developer tools for XCode MacOS installed in your system
cd pyperclip-1.8.2
python3 setup.py install

Verifying pyperclip installation on macOS:
Make the following import in your python terminal to verify if the installation has been done properly:
import pyperclip
If there is any error while importing the module then is not installed properly.
Similar Reads
How to Install Pyglet in Python on MacOS? In this article, we will learn how to install Pyglet in Python on MacOS. Pyglet is a cross-platform windowing and multimedia library for Python, intended for developing games and other visually rich applications. Installation:Method 1: Using pip to install Pyglet Follow the below steps to install th
2 min read
How to Install pyperclip in Python on Linux? Pyperclip is a cross-platform Python module for copy and pasting, or we can say that it provides clipboard functionality. It was created to allow cross-platform copy-pasting in Python which was before missing. It is available for Python 2 and 3. In this article, we will look into the steps of instal
1 min read
How to Install PyGTK in Python on MacOS? PyGTK is a Python package or module that enables developers to work with GTK+ GUI Toolkit. This is how WikiBooks describes GTK+: "GTK+ is a highly usable, feature rich toolkit for creating graphical user interfaces which boasts cross platform compatibility and an easy to use API." And this is how gt
4 min read
How to Install Packages in Python on MacOS? To get started with using pip, you should install Python on your system. Make sure that you have a working pip. Installing Packages in Python on MacOS: Follow the below steps to install python packages on MacOS: Step 1: As the first step, you should check that you have a working Python with pip inst
2 min read
How to Install PyMedia for Python on MacOS? PyMedia is basically a python library that can provide functionalities for audio as well as video processing. It supports a huge range of audio and video codecs, file formats, and protocols, which makes it a valuable tool for developers who's looking to build applications for the multimedia industry
3 min read
How to Install glob in Python on MacOS? In this article, we will learn how to install glob in Python on MacOS. Glob is a general term used to define techniques to match specified patterns according to rules related to Unix shell. Linux and Unix systems and shells also support glob and also provide function glob() in system libraries. Inst
2 min read