I'm getting a ModuleNotFoundError
for my module pyperclip
. When I run pip install
on it, I get a message saying I've already installed it so I'm not exactly sure why Python isn't finding it. When I run my program on PyCharm
, it runs fine.
How do I change the path or solve it in some other way so it can find it? My environment variables are all pointing to the Anaconda directories in a Windows machine. Thanks in advance.
Asked
Active
Viewed 1,113 times
0
3 Answers
0
Type "which python" and "pip --version" and check that their folders match.
For example, my "which python3" == "/usr/local/bin/python3", and my "pip3 --version" == "/usr/local/lib/python3.6/site-packages".

Dwaxe
- 109
- 1
- 6
-
This is more suited as a comment since it's not answering the question. It's only used for debugging – Taku Mar 12 '17 at 00:11
-
What should I do if I run each of these and get different paths? – Evan93 Apr 22 '21 at 22:51
0
Alternatively, you can install using conda
. According to anaconda page, you can simply do this:
conda install -c bryanwweber pyperclip=1.5.27

smttsp
- 4,011
- 3
- 33
- 62
0
I had the same problem. I found a quick fix by copying the 'pyperclip' folder from the Anaconda directory, to one of Python's default module directories.
The default python directory for 3rd party modules will look something like this depending on where you installed it:
C:\Python36\Lib\site-packages
Still trying to figure out how to get python to look at the Anaconda directory again.

WastedHat
- 15
- 1
- 6