问题
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 :)
回答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.
回答2:
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.
来源:https://stackoverflow.com/questions/40951482/installed-pyperclip-trouble-importing-to-idle