How do I import Pyperclip in Jupyter Notebook?

Viewed 902

I have read through all the posts on the site regarding importing pyperclip but have not been able to resolve the issue.

I am working through Al Schwigert's "Automate the Boring Stuff With Python" and am on the chapter 7 exercise called "phoneAndEmail.py"

I am using Python 3.6 hosted in Jupyter Notebook and I used Anaconda to install it.

Thanks for any help

Here is my code;

import pyperclip

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-ad44bca9d5b1> in <module>
----> 1 import pyperclip

ModuleNotFoundError: No module named 'pyperclip'
1 Answers
  • pyperclip is not part of the anaconda distribution, so it needs to be installed.
  • To install this package with conda, run one of the following (probably the first or second option) at the Anaconda prompt.
    • conda install pyperclip
    • conda install -c conda-forge pyperclip
    • conda install -c conda-forge/label/gcc7 pyperclip
    • conda install -c conda-forge/label/cf201901 pyperclip
    • conda install -c conda-forge/label/cf202003 pyperclip
  • pip install pyperclip for those without Anaconda
Related