Search code examples
pythoncmdpyperclipmodulenotfounderror

ModuleNotFound error but module has just been installed


I'm using Windows 10, Python 3.6.4. I'm trying to use the module Pyperclip and have installed it with pip:

c:\Users\Bertie>pip install pyperclip
Requirement already satisfired: pyperclip in c:\python36\lib\site-packages (1.8.0)

But when I try to run a program which uses this module, I get this error:

c:\Users\Bertie\scraping.py test
Traceback (most recent call last):
File "C:\Users\Bertie\scraping.py", line 3, in <module>
    import webbrowser, sys, pyperclip
ModuleNotFoundError: No module named 'pyperclip'

How can I fix this? Thank you.


Solution

  • The reinstall trace shows you install the packge successflly for python36. Check if there is more than one python in your system. Type "python" in your windows cmd console, and check the python version to see if python36 is the default one. Then explicitly use the python interpreter to start the script "python your_python_script.py".