0

Title says it all;

Tried typical cmd commands like:

pip install pypiwin32
python -m pip install pypiwin32

Python script:

import pip

def install(package):
    pip.main(['install', package])

if __name__ == '__main__':
    install("pypiwin32") # also tried 'pywin32'

I run the above script and get the message:

Requirement already satisfied: pypiwin32 in 'path'

Then run test command:

import pypiwin32

and get:

builtins.ModuleNotFoundError: No module named 'pypiwin32'

Is there something wrong with my path? Do i HAVE to install it as a .whl file?

Not sure what I am doing wrong here. I am wanting a module to convert text to speech.

1 Answer 1

2

Ok, not sure if i should answer my own question or delete this, but it may help someone in the future.

I went into my python path and checked my .pyd files, it turns out there was no module called pypiwin32. instead the module is called win32com.pyd

So using the following code:

import win32com.client as wincl
wincl.Dispatch("SAPI.SpVoice").Speak("Speak English, parle français")
Sign up to request clarification or add additional context in comments.

1 Comment

Doesn't speak French aparently, hahaha :P.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.