nateshmbhat / pyttsx3

Offline Text To Speech synthesis for python
Mozilla Public License 2.0
2.08k stars 328 forks source link

Unable to install on MacBook Pro 2021 #227

Open ErikLippert opened 2 years ago

ErikLippert commented 2 years ago

I tried to install the library with both pip install pyttsx3 and pip install -U git+https://github.com/nateshmbhat/pyttsx3, both failed with the following error:

    Modules/objc/test/objectint.m:123:37: error: 'NSArchiver' is deprecated: first deprecated in macOS 10.13 - Use NSKeyedArchiver instead [-Werror,-Wdeprecated-declarations]
    + (id)replacementObjectForArchiver:(NSArchiver*)archiver of:(NSObject*)object
                                        ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArchiver.h:15:12: note: 'NSArchiver' has been explicitly marked deprecated here
    @interface NSArchiver : NSCoder {
               ^
    Modules/objc/test/objectint.m:125:20: error: 'replacementObjectForArchiver:' is deprecated: first deprecated in macOS 10.13 [-Werror,-Wdeprecated-declarations]
        return [object replacementObjectForArchiver:archiver];
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       replacementObjectForCoder
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArchiver.h:95:1: note: 'replacementObjectForArchiver:' has been explicitly marked deprecated here
    - (nullable id)replacementObjectForArchiver:(NSArchiver *)archiver API_DEPRECATED_WITH_REPLACEMENT("replacementObjectForCoder:", macos(10.0,10.13), ios(2.0,11.0), watchos(2.0,4.0), tvos(9.0,11.0));
    ^
    2 errors generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/e/Documents/GitHub/project/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s3/bbwn4pfj143dp9bf86bkdjd40000gn/T/pip-install-f_b0re0o/pyobjc-core/setup.py'"'"'; __file__='"'"'/private/var/folders/s3/bbwn4pfj143dp9bf86bkdjd40000gn/T/pip-install-f_b0re0o/pyobjc-core/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/s3/bbwn4pfj143dp9bf86bkdjd40000gn/T/pip-record-0_r19ohc/install-record.txt --single-version-externally-managed --compile --install-headers /Users/e/Documents/GitHub/project/env/include/site/python3.8/pyobjc-core Check the logs for full command output

(This is shortened as the full error has thousands of characters)

I am on the MacBook Pro 2021 with m1 Pro chip and on macOS Monterey 12.2

I would love an update to fix this or someone telling me what I did wrong if it's my fault

Crear12 commented 1 year ago

For macOS, simply use os.system('say Hello World')