Just started learning Python. And i'm having trouble using the Pyperclip module.
When I tried to use the pip install pyperclip
in the command line, it shows up this error:
pip install pyperclip
^
SyntaxError: invalid syntax
I am running Python 3.5 (32 bit) on a Windows 7 desktop.
Project description. Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with Python 2 and 3.
Installing pyperclip:To copy text to the clipboard, pass a string to pyperclip. copy() . To paste the text from the clipboard, call pyperclip. paste() and the text will be returned as a string value.
open command prompt type: pip install pyperclip
if this doesn't work then do this use cd Python35/Scripts to get to the scripts folder This is the folder where pip is located.
Now type: pip install pyperclip
This will download and install pyperclip
now type: pip freeze
And pyperclip should be listed
If you want to test in python shell remember to close the shell(if open) and open new one because it needs to load the new package.
type in python shell: import pyperclip
it should accept it and now you can pyperclip.copy() and pyperclip.paste()
Good luck!
sudo pip3 install pyperclip
did the trick for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With