0

I have no idea why this is so frustrating, but I have literally pulled out a few clumps of hair in rage because this just refuses to work and I honestly do not have the slighest clue on what to do. I am trying to use the winshell module for a quick python programming I am using. I am new to python and just started trying it today. I have tried to install the library manually, and through pip. pip claims the module is downloaded, and I can see it in the lib folder. No matter what I do I get this error when I try to run my code:

import winshell
ModuleNotFoundError: No module named 'winshell'

what on earth must I do to get this to work I am at my wits end here and I feel like I'm going to break something

GIZ
  • 4,409
  • 1
  • 24
  • 43
dyl4n130
  • 31
  • 1
  • 4
  • 2
    Are you sure you have it installed for the same version as the script you're importing it with, and it is correctly placed in Python's path (this might be a problem if you installed in manually)? Aside from that I can't immediately see what the problem might be due to the limited info in the question. `pip -V`, `pip freeze`, `sys.path`, how you're calling the script and exactly where you've placed the module would be helpful. – Izaak van Dongen Aug 26 '17 at 20:01
  • 1
    Which Python's lib folder do you see it in? – OneCricketeer Aug 26 '17 at 20:06
  • Which version of python do you use? – ands Aug 26 '17 at 20:36

1 Answers1

3

You have to install the library with:

pip install winshell

I just tested with pip3 install winshell and it worked.

Python interpreter search for modules in the set of directories that you can see with:

import sys
print(sys.path)

I recommend you take a look to see if the directory where you are seeing the library in lib is include in that list.

Might be useful to you read: The Module Search Path

  • 1
    Although the question isn't very substantiated, "pip claims the module is downloaded" would seem to imply OP has tried this. – Izaak van Dongen Aug 26 '17 at 20:06
  • 1
    @IzaakvanDongen Agreed just wanted to be sure that he typed the right commands and give him the insurance that the installation actually worked as I present it here. He said that is new to Python and he did not show the command he executed to install the library. –  Aug 26 '17 at 20:10
  • The answer isn't "works on my machine", OP said he installed with pip, but it obviously isn't installed so the problem is probably that OP installed module for the wrong version of python, and in this case using command `pip3 install winshell` should resolve his problems. – ands Aug 26 '17 at 20:36