1

I am currently learning my very first computer language and have chosen to go the python route. Very Excited! However, I have come across an error just over my head while trying to install and import pyperclip.

After successfully installing pyperclip into the terminal, I get...

Requirement already satisfied: pyperclip in ./anaconda/lib/python3.5/site-packages

However, when I go to IDLE and import pyperclip, I get...

ImportError: No module named 'pyperclip'

Do I have to install pyperclip a different way? It seems that the conflict between pip and conda is just a little more complicated than my current level of experience.

Tried...

  • sudo pip3 install pyperclip

  • sudo conda install pyperclip

  • sudo easy_install pyperclip

  • sudo pip3 easy_install pyperclip

Before asking this question, I have searched stackoverflow and anaconda for a good minute trying to sort this out. Thanks in advance for your help :)

Community
  • 1
  • 1
julio0703
  • 11
  • 4
  • Normally, a third party packages much be installed separately for each Python executable that you want to run it with. Perhaps you are not running IDLE with the executable that comes with Anaconda. To check, run `import sys; sys.executable` at IDLE's `>>> ` prompt. You could also run `sys.path` to see if the import path includes `.../anaconda/lib/python3.5/site-packages`. – Terry Jan Reedy Dec 03 '16 at 21:35
  • hey skrtbhtngr. this is what I did. I had to take a command line tutorial via https://www.codecademy.com/lea...​ and learned how to remove files and directories from the computer. I removed anaconda and python directories from the computer, but not Python.framework as stated in https://docs.python.org/3/usin... After removing these directories, I downloaded python 3 from https://www.python.org/downloa... and typed sudo pip3 install pyperclip into the command line. I already downloaded pyperclip. And import pyperclip worked in IDLE. So excited to get this working. – julio0703 Dec 07 '16 at 15:41
  • thanks for the response though. I def would have tried your method had I seen it earlier :) – julio0703 Dec 07 '16 at 15:42

2 Answers2

1

I can't explain why it worked for me because I am very fresh to programming but you might try to do what I did when I had exactly the same problem.

I tried those two method of instalation in terminal:

pip install --user pyperclip

pip3 install pyperclip

After that I imported the module succesfully, so probably one of those was the right method.

0

I was having this same issue. I have Anaconda installed and was able to install pyperclip without any issues. I'm on a Windows 10 machine. What I did was go into the site-packages folder under Anaconda, copy two folders: pyperclip and pyperclip-1.6.0.dist-info. I opened the site-packages folder under my Idle folder and pasted them there. I'm not sure if this is actually a good way to do this (as I am very new to Python), but it worked.

DataGirl
  • 429
  • 9
  • 21