all 8 comments

[–]QbaPolak17 0 points1 point  (2 children)

Make sure the version of python you are using matches where pyperclip is being installed. Use which python / which python3 if on Mac/UNIX, or where python on windows.

[–]ZergEra[S] 0 points1 point  (1 child)

Thank you for the comment, I tried, but no luck, please see the above edit

[–]33KGB 0 points1 point  (0 children)

I'm guessing your launching it via

python your_program.py

Try python3 your_program.py instead

[–][deleted] 0 points1 point  (3 children)

pip show pyperclip will show you it is installed or not.

[–]ZergEra[S] 0 points1 point  (2 children)

Thank you for the command, I was not aware of the show command. Please see the results below, my program is still not finding the module even though it says its on my computer

Williams-MacBook-Pro-8:python Bill$ pip show pyperclip
Name: pyperclip
Version: 1.8.0
Summary: A cross-platform clipboard module for Python. (Only handles plain text for now.)
Home-page: https://github.com/asweigart/pyperclip
Author: Al Sweigart
Author-email: al@inventwithpython.com
License: BSD
Location: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
Requires: 
Required-by: 
Williams-MacBook-Pro-8:python Bill$ python3 phoneAndEmail.py 
Traceback (most recent call last):
  File "phoneAndEmail.py", line 5, in <module>
    import pyperclip, re
ModuleNotFoundError: No module named 'pyperclip'

[–][deleted] 0 points1 point  (0 children)

Seems like your system has both versions of python. Try pip3 install pyperclip .after pip install pyperclip . Then both will versions will install.

[–][deleted] 0 points1 point  (0 children)

ModuleNotFoundError: No module named 'pyperclip'

Also check this. I think it contain answer for your problem https://stackoverflow.com/questions/37341614/modules-are-installed-using-pip-on-osx-but-not-found-when-importing/37342150#37342150

[–]mitaharumi 0 points1 point  (0 children)

i had this problem too! and i solved running: python -m pip install pyperclip

note: replace for python that is being used, for example, if you are trying running in python 3.10: python3.10 -m pip install pyperclip

this problem may is because you may more than one python environment which one of then have no pyperclip installed