Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install issues (Could not build wheels for pyobjc-core, pyobjc-framework-Cocoa) #7

Open
joeypiccola opened this issue Jun 18, 2024 · 10 comments

Comments

@joeypiccola
Copy link

joeypiccola commented Jun 18, 2024

I am trying to install py3-tts on my mac via python3 -m pip install py3-tts. I am using venv fwiw. I am not sure how to debug the following install errors. I have run python3 -m pip install --upgrade wheel successfully. I am using Python 3.12.3.

Collecting py3-tts
  Using cached py3_tts-3.5-py3-none-any.whl.metadata (25 kB)
Collecting six (from py3-tts)
  Using cached six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
<
.
..
...
omitted
...
..
.
>
Using cached pyobjc_framework_Vision-9.0.1-cp36-abi3-macosx_11_0_universal2.whl (16 kB)
Using cached pyobjc_framework_WebKit-9.0.1-cp36-abi3-macosx_11_0_universal2.whl (39 kB)
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: pyobjc-core, pyobjc-framework-Cocoa
  Building wheel for pyobjc-core (pyproject.toml): started
  Building wheel for pyobjc-core (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for pyobjc-core (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [209 lines of output]
      running bdist_wheel
      running build
      running build_py
      Overriding build_packages to copy PyObjCTest
      creating build
      creating build/lib.macosx-13.0-x86_64-cpython-312
      creating build/lib.macosx-13.0-x86_64-cpython-312/objc
<
.
..
...
omitted
...
..
.
>
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/objc/OC_PythonNumber.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/objc/OC_PythonNumber.o -g -fexceptions -fno-objc-arc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -Wno-unknown-pragmas -Wshorten-64-to-32 -Werror -I/usr/include/ffi -fvisibility=hidden -g -O3 -flto=thin -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DPyObjC_BUILD_RELEASE=1402
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/objc/OC_PythonObject.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/objc/OC_PythonObject.o -g -fexceptions -fno-objc-arc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -Wno-unknown-pragmas -Wshorten-64-to-32 -Werror -I/usr/include/ffi -fvisibility=hidden -g -O3 -flto=thin -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DPyObjC_BUILD_RELEASE=1402
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/objc/OC_PythonSet.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/objc/OC_PythonSet.o -g -fexceptions -fno-objc-arc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -Wno-unknown-pragmas -Wshorten-64-to-32 -Werror -I/usr/include/ffi -fvisibility=hidden -g -O3 -flto=thin -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DPyObjC_BUILD_RELEASE=1402
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/objc/OC_PythonUnicode.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/objc/OC_PythonUnicode.o -g -fexceptions -fno-objc-arc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -Wno-unknown-pragmas -Wshorten-64-to-32 -Werror -I/usr/include/ffi -fvisibility=hidden -g -O3 -flto=thin -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DPyObjC_BUILD_RELEASE=1402
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/objc/ObjCPointer.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/objc/ObjCPointer.o -g -fexceptions -fno-objc-arc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -Wno-unknown-pragmas -Wshorten-64-to-32 -Werror -I/usr/include/ffi -fvisibility=hidden -g -O3 -flto=thin -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DPyObjC_BUILD_RELEASE=1402
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/objc/block_support.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/objc/block_support.o -g -fexceptions -fno-objc-arc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -Wno-unknown-pragmas -Wshorten-64-to-32 -Werror -I/usr/include/ffi -fvisibility=hidden -g -O3 -flto=thin -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DPyObjC_BUILD_RELEASE=1402
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/objc/bundle-variables.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/objc/bundle-variables.o -g -fexceptions -fno-objc-arc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -Wno-unknown-pragmas -Wshorten-64-to-32 -Werror -I/usr/include/ffi -fvisibility=hidden -g -O3 -flto=thin -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DPyObjC_BUILD_RELEASE=1402
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/objc/class-builder.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/objc/class-builder.o -g -fexceptions -fno-objc-arc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -Wno-unknown-pragmas -Wshorten-64-to-32 -Werror -I/usr/include/ffi -fvisibility=hidden -g -O3 -flto=thin -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DPyObjC_BUILD_RELEASE=1402
      Modules/objc/class-builder.m:1999:17: error: code will never be executed [-Werror,-Wunreachable-code]
                      PyMem_Free(argbuf);
                      ^~~~~~~~~~
      Modules/objc/class-builder.m:1990:17: error: code will never be executed [-Werror,-Wunreachable-code]
                      PyMem_Free(argbuf);
                      ^~~~~~~~~~
      2 errors generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyobjc-core
  Building wheel for pyobjc-framework-Cocoa (pyproject.toml): started
  Building wheel for pyobjc-framework-Cocoa (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for pyobjc-framework-Cocoa (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [517 lines of output]
      running bdist_wheel
      running build
      running build_py
      overriding build_packages to copy PyObjCTest
      creating build
      creating build/lib.macosx-13.0-x86_64-cpython-312
<
.
..
...
omitted
...
..
.
>      
      copying PyObjCTest/test_nssimplehorizontaltypesetter.py -> build/lib.macosx-13.0-x86_64-cpython-312/PyObjCTest
      copying PyObjCTest/test_cfdata.py -> build/lib.macosx-13.0-x86_64-cpython-312/PyObjCTest
      copying PyObjCTest/test_nsxmlelement.py -> build/lib.macosx-13.0-x86_64-cpython-312/PyObjCTest
      copying PyObjCTest/test_nsclipview.py -> build/lib.macosx-13.0-x86_64-cpython-312/PyObjCTest
      copying PyObjCTest/test_nspagecontroller.py -> build/lib.macosx-13.0-x86_64-cpython-312/PyObjCTest
      copying PyObjCTest/test_nsimage.py -> build/lib.macosx-13.0-x86_64-cpython-312/PyObjCTest
      copying PyObjCTest/test_nsscrubberlayout.py -> build/lib.macosx-13.0-x86_64-cpython-312/PyObjCTest
      copying PyObjCTest/test_nslog.py -> build/lib.macosx-13.0-x86_64-cpython-312/PyObjCTest
      running build_ext
      building 'CoreFoundation._inlines' extension
      creating build/temp.macosx-13.0-x86_64-cpython-312
      creating build/temp.macosx-13.0-x86_64-cpython-312/Modules
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/_CoreFoundation_inlines.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/_CoreFoundation_inlines.o -Wno-deprecated-declarations -DPyObjC_BUILD_RELEASE=1303 -Werror
      clang -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk build/temp.macosx-13.0-x86_64-cpython-312/Modules/_CoreFoundation_inlines.o -o build/lib.macosx-13.0-x86_64-cpython-312/CoreFoundation/_inlines.cpython-312-darwin.so -framework CoreFoundation
      building 'CoreFoundation._CoreFoundation' extension
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/_CoreFoundation.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/_CoreFoundation.o -Wno-deprecated-declarations -DPyObjC_BUILD_RELEASE=1303 -Werror
      clang -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk build/temp.macosx-13.0-x86_64-cpython-312/Modules/_CoreFoundation.o -o build/lib.macosx-13.0-x86_64-cpython-312/CoreFoundation/_CoreFoundation.cpython-312-darwin.so -framework CoreFoundation
      building 'Foundation._inlines' extension
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/_Foundation_inlines.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/_Foundation_inlines.o -Wno-deprecated-declarations -DPyObjC_BUILD_RELEASE=1303 -Werror
      clang -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk build/temp.macosx-13.0-x86_64-cpython-312/Modules/_Foundation_inlines.o -o build/lib.macosx-13.0-x86_64-cpython-312/Foundation/_inlines.cpython-312-darwin.so -framework Foundation
      building 'Foundation._Foundation' extension
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/user/Documents/python/python30/speak/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c Modules/_Foundation.m -o build/temp.macosx-13.0-x86_64-cpython-312/Modules/_Foundation.o -Wno-deprecated-declarations -DPyObjC_BUILD_RELEASE=1303 -Werror
      In file included from Modules/_Foundation.m:14:
      Modules/_Foundation_string.m:36:9: error: variable 'buf2' is uninitialized when used here [-Werror,-Wuninitialized]
          if (buf2 != Py_None && buf2 != PyObjC_NULL) {
              ^~~~
      Modules/_Foundation_string.m:18:34: note: initialize the variable 'buf2' to silence this warning
          PyObject *        buf1, *buf2;
                                       ^
                                        = NULL
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyobjc-framework-Cocoa
Failed to build pyobjc-core pyobjc-framework-Cocoa
ERROR: Could not build wheels for pyobjc-core, pyobjc-framework-Cocoa, which is required to install pyproject.toml-based projects

@BirgitPohl
Copy link

Me too!

@prof-stefano
Copy link

Me too...

@mehul-lega
Copy link

Me too

@willwade
Copy link

willwade commented Jul 8, 2024

Interesting this. I've not found this myself. I'm assuming you have Xcode build tools installed. i.e xcode-select --install

the answer is that full wheels are built for silicon and intel Mac.. But that feels a bit heavy-handed (there are a lot of dependencies on Mac)

@TangLi1996
Copy link

I added the PyObjC==9.1.1 in the requirements.txt and the error message doesn't exist anymore.

@Luanruy
Copy link

Luanruy commented Jul 16, 2024

It may be the problem with pyobjc==9.0.1? I can install the 9.1.1version successfully. But the 9.0.1 which is used in py3-tts failed to be installed. Someone has mentioned it to pyobjc.
munki/munki#1178

@Luanruy
Copy link

Luanruy commented Jul 16, 2024

I added the PyObjC==9.1.1 in the requirements.txt and the error message doesn't exist anymore.

I tryed to change 9.0.1 to 9.1.1, but I recived a segmentation fault. Can you run it properly?🥺

@TangLi1996
Copy link

I added the PyObjC==9.1.1 in the requirements.txt and the error message doesn't exist anymore.

I tryed to change 9.0.1 to 9.1.1, but I recived a segmentation fault. Can you run it properly?🥺

I encountered the same error and tried to fix it for 2 days, but I could not solve it, so I gave it up. T_T
I also tried to use pyttsx3 under python3.6, also failed.

@Luanruy
Copy link

Luanruy commented Jul 16, 2024

I added the PyObjC==9.1.1 in the requirements.txt and the error message doesn't exist anymore.

I tryed to change 9.0.1 to 9.1.1, but I recived a segmentation fault. Can you run it properly?🥺

I encountered the same error and tried to fix it for 2 days, but I could not solve it, so I gave it up. T_T I also tried to use pyttsx3 under python3.6, also failed.

thanks QAQ

@j1r2d
Copy link

j1r2d commented Aug 2, 2024

I am still having this problem. Has anyone found a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants