0

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.

smttsp
  • 4,011
  • 3
  • 33
  • 62
Ricardo
  • 1
  • 4

3 Answers3

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
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