How to Install pyperclip in Python
A cross-platform clipboard module for Python. (Only handles plain text for now.)
pip install pyperclip
What is pyperclip?
A cross-platform clipboard module for Python. (Only handles plain text for now.)
Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with Python 2 and 3.
Al Sweigart [email protected] BSD License
>>> import pyperclip >>> pyperclip.copy('The text to be copied to the clipboard.') >>> pyperclip.paste() 'The text to be copied to the clipboard.'
Quick Start
Minimal example to get started with pyperclip:
import pyperclip
print(pyperclip.__version__)
Installation
pip (standard)
pip install pyperclip
Virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install pyperclip
pip3
pip3 install pyperclip
conda
conda install -c conda-forge pyperclip
Poetry
poetry add pyperclip
Verify the Installation
After installing, confirm the package is available:
python -c "import pyperclip; print(pyperclip.__version__)"
If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.
Installation Errors
Common errors when installing pyperclip with pip.
ModuleNotFoundError: No module named 'pyperclip'
Cause: The package is not installed in the current Python environment.
Fix: Run pip install pyperclip. If using a virtual environment, ensure it is activated first.
ModuleNotFoundError: No module named 'pyperclip' (installed but still failing)
Cause: pip installed the package into a different Python than the one running your script.
Fix: Use python -m pip install pyperclip to install into the interpreter you are running.
ImportError: cannot import name 'X' from 'pyperclip'
Cause: The function or class does not exist in the installed version.
Fix: Check the version with pip show pyperclip and upgrade with pip install --upgrade pyperclip.
pip: command not found
Cause: pip is not in PATH or Python was not added to PATH during installation.
Fix: Try python -m pip install pyperclip. On macOS/Linux try pip3.
PermissionError: [Errno 13] Permission denied
Cause: No write access to the system Python package directory.
Fix: Use a virtual environment, or add --user: pip install --user pyperclip
SSL: CERTIFICATE_VERIFY_FAILED
Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.
Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org pyperclip
Recent Releases
| Version | Released |
|---|---|
1.11.0 latest |
2025-09-26 |
1.10.0 |
2025-09-18 |
1.9.0 |
2024-06-18 |
1.8.2 |
2021-02-21 |
1.8.1 |
2020-10-11 |
Manage pyperclip
Upgrade to latest version
pip install --upgrade pyperclip
Install a specific version
pip install pyperclip==1.11.0
Uninstall
pip uninstall pyperclip
Check what is installed
pip show pyperclip