1

I have python 3.7.6 installed and when I try to install pyttsx3 on my windows 10, I had an error, that I need mac os, but it installing on another computer with windows. I have tried to reinstall python and cleared pip cache, but it didn't work. This is an error:

ERROR: Command errored out with exit status 1:
 command: 'c:\users\pfkcs\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\pfkcs\AppData\Local\Temp\pip-install-y_mkf7t4\pyobjc-core\setup.py'"'"'; file='"'"'C:\Users\pfkcs\AppData\Local\Temp\pip-install-y_mkf7t4\pyobjc-core\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
     cwd: C:\Users\pfkcs\AppData\Local\Temp\pip-install-y_mkf7t4\pyobjc-core\
Complete output (2 lines):
running egg_info
error: PyObjC requires macOS to build
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

  • See [this](https://github.com/asweigart/pyautogui/issues/381) post titled "pyautogui fails to install on windows- error: PyObjC requires macOS to build" – Señor CMasMas Jan 24 '20 at 15:58
  • Does this answer your question? [While installing pyttsx3: Command errored out with exit status 1](https://stackoverflow.com/questions/59909818/while-installing-pyttsx3-command-errored-out-with-exit-status-1) – phd Jan 28 '20 at 06:25

3 Answers3

0

try pip install -U pyttsx3

If still not working, you may have to install a specific version of pyttsx3. The most stable previous version is 2.71, you can install it by pip install -U pyttsx3==2.71

Hope this works.

SRP
  • 21
  • 4
0

It might help to run your Python code in an virtual env, by either anaconda if you have it installed: conda create -n <venv name> python=3.6 or python -m venv . if you do not have anaconda. Then either pip install pyttsx3 or py -m pip install pyttsx3 if the other doesn't work

Jarrett
  • 486
  • 7
  • 13
-2

First you have to install Python for windows extension. click here to download Then you’ll need to give your virtualenv access to the system site-packages in order to install pyttsx.:

virtualenv --system-site-packages myproj
. myproj/bin/activate
pip install pyttsx

may be this could help you

unknown
  • 322
  • 6
  • 25
  • Just my two cents. I think it's better to use the "official" cpython windows distribution from www.python.org ... which exists also in 64 bits. – Michael Hooreman Jan 24 '20 at 16:05