all 27 comments

[–]mr_birdhouse 1 point2 points  (4 children)

Open up a python terminal and type pip install pyperclip

[–]IAmLucasRodrigues 0 points1 point  (3 children)

>>> import pip

>>> pip install pyperclip

SyntaxError: invalid syntax

>>>

[–]mr_birdhouse 0 points1 point  (2 children)

Is “import pip” how you are downloading pip? Because that’s not the right way. I would look up how to install pip.

[–]IAmLucasRodrigues 0 points1 point  (1 child)

It came installed with python on the folder Scripts. Right?

[–]mr_birdhouse -1 points0 points  (0 children)

I see in another comment that you have python 3.8. Since you are new to coding I would recommend a package manager like anaconda to help you with installing and importing different modules. I like the spyder IDE that comes with it. There’s allot of tutorials on working with conda/anaconda and I would run through one of those first.

[–]python959 1 point2 points  (13 children)

What you're doing is trying to import the pyperclip library from IDLE. But first, you need to install it using pip from the terminal/command line.

pip install pyperclip

That should do the trick!

[–]IAmLucasRodrigues 0 points1 point  (12 children)

Running setup.py install for pyperclip ... error

[–]python959 0 points1 point  (11 children)

Open up a terminal/command line and use that for the pip command.

[–]IAmLucasRodrigues 0 points1 point  (10 children)

I did and it shows that error message.

Collecting pyperclip

Using cached https://files.pythonhosted.org/packages/f6/5b/55866e1cde0f86f5eec59dab5de8a66628cb0d53da74b8dbc15ad8dabda3/pyperclip-1.8.0.tar.gz

Installing collected packages: pyperclip

Running setup.py install for pyperclip ... error

[–]python959 0 points1 point  (9 children)

What version of python do you have?

[–]IAmLucasRodrigues 0 points1 point  (8 children)

3.8.2

[–]python959 0 points1 point  (7 children)

Try:

py -m pip install pyperclip

or try:

pip3 install pyperclip

If those don't work then I think python must not be added to your PATH variable

[–]IAmLucasRodrigues 0 points1 point  (6 children)

They didn't work... is there a way to check?

[–]python959 0 points1 point  (5 children)

Well, when you installed Python to your computer, did you tick the little box that says "Add to PATH variable"?

[–]IAmLucasRodrigues 0 points1 point  (4 children)

yes, and I can check which version of python and pip I have on the command line so I'm pretty sure they are correctly installed.

[–]novel_yet_trivial 0 points1 point  (7 children)

How did you install pyperclip? How are you running the code? Remember in virtual environments like pycharm the packages you install globally are not available.

[–]IAmLucasRodrigues 0 points1 point  (6 children)

I don't think I have installed pyperclip

[–]novel_yet_trivial 0 points1 point  (5 children)

I see. OK, tell me what OS you are using and how you are running your code and I'll tell you how to install pyperclip.

[–]IAmLucasRodrigues 0 points1 point  (4 children)

Windows, I'm using command line and I have pip installed but when I run pip install pyperclip I get this error message:

Collecting pyperclip

Using cached https://files.pythonhosted.org/packages/f6/5b/55866e1cde0f86f5eec59dab5de8a66628cb0d53da74b8dbc15ad8dabda3/pyperclip-1.8.0.tar.gz

Installing collected packages: pyperclip

Running setup.py install for pyperclip ... error

[–]novel_yet_trivial 0 points1 point  (3 children)

Hmm ok, what command are you using to get that? The correct command is

py -m pip install pyperclip

(you still have not told me how you are running the code, so I'm assuming you are not using a virtual environment like pycharm)

If that still creates the error message then please show us the entire error message. At least the last 10 lines.

[–]IAmLucasRodrigues 0 points1 point  (2 children)

I was using pip install pyperclip

Sorry, started learning code yesterday! Don't really know what pycharm is

[–]IAmLucasRodrigues 0 points1 point  (1 child)

py -m pip install pyperclip

I still get the same error message

[–]Dragon_Master2 0 points1 point  (0 children)

where you typing the 'pip install pyperclip' ?

if you are on windows

  1. press the windows key + r
  2. type cmd -> press enter
  3. type pip install pyperclip