installed Pyperclip, trouble importing to IDLE

…衆ロ難τιáo~ 提交于 2020-07-19 12:19:55

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!