Pyobjus not working on Mac Catalina
temitayoadefemimatthew opened this issue · 8 comments
When i try to install pyobjus on my mac, i receive this error, i've been struggling with this for 2 weeks and i would appreciate help.
Below is the error
Successfully installed cython-0.29.16
temitayoadefemi@Temitayos-MacBook-Air ~ % pip3 install pyobjus
Collecting pyobjus
Using cached pyobjus-1.1.0.tar.gz (72 kB)
Building wheels for collected packages: pyobjus
Building wheel for pyobjus (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-install-_8mr0nf3/pyobjus/setup.py'"'"'; __file__='"'"'/private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-install-_8mr0nf3/pyobjus/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-wheel-hy1qsk5y
cwd: /private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-install-_8mr0nf3/pyobjus/
Complete output (74 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.15-x86_64-3.7
copying setup.py -> build/lib.macosx-10.15-x86_64-3.7
creating build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/dylib_manager.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/protocols.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/objc_py_types.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
creating build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
copying pyobjus/consts/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
copying pyobjus/consts/corebluetooth.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
running build_ext
cythoning pyobjus/pyobjus.pyx to pyobjus/pyobjus.c
/usr/local/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-install-_8mr0nf3/pyobjus/pyobjus/pyobjus.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pyobjus' extension
creating build/temp.macosx-10.15-x86_64-3.7
creating build/temp.macosx-10.15-x86_64-3.7/pyobjus
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c pyobjus/pyobjus.c -o build/temp.macosx-10.15-x86_64-3.7/pyobjus/pyobjus.o
In file included from pyobjus/pyobjus.c:608:
pyobjus/_runtime.h:33:23: error: too many arguments to function call, expected 0, have 2
return objc_msgSend(pool, sel_registerName("init"));
~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
OBJC_EXPORT void
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
# define OBJC_EXPORT OBJC_EXTERN OBJC_VISIBLE
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
# define OBJC_EXTERN extern
^
In file included from pyobjus/pyobjus.c:608:
pyobjus/_runtime.h:37:22: error: too many arguments to function call, expected 0, have 2
(void)objc_msgSend(pool, sel_registerName("drain"));
~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
OBJC_EXPORT void
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
# define OBJC_EXPORT OBJC_EXTERN OBJC_VISIBLE
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
# define OBJC_EXTERN extern
^
pyobjus/pyobjus.c:24583:25: error: too many arguments to function call, expected 0, have 2
(void)(objc_msgSend(__pyx_v_self->o_instance, sel_registerName(((char *)"release"))));
~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
OBJC_EXPORT void
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
# define OBJC_EXPORT OBJC_EXTERN OBJC_VISIBLE
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
# define OBJC_EXTERN extern
^
pyobjus/pyobjus.c:24660:45: error: too many arguments to function call, expected 0, have 2
__pyx_v_self->o_instance = objc_msgSend(__pyx_v_self->o_instance, sel_registerName(((char *)"retain")));
~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
OBJC_EXPORT void
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
# define OBJC_EXPORT OBJC_EXTERN OBJC_VISIBLE
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
# define OBJC_EXTERN extern
^
4 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pyobjus
Running setup.py clean for pyobjus
Failed to build pyobjus
Installing collected packages: pyobjus
Running setup.py install for pyobjus ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-install-_8mr0nf3/pyobjus/setup.py'"'"'; __file__='"'"'/private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-install-_8mr0nf3/pyobjus/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/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-record-8ig0oedo/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/pyobjus
cwd: /private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-install-_8mr0nf3/pyobjus/
Complete output (72 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.15-x86_64-3.7
copying setup.py -> build/lib.macosx-10.15-x86_64-3.7
creating build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/dylib_manager.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/protocols.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/objc_py_types.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
creating build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
copying pyobjus/consts/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
copying pyobjus/consts/corebluetooth.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
running build_ext
skipping 'pyobjus/pyobjus.c' Cython extension (up-to-date)
building 'pyobjus' extension
creating build/temp.macosx-10.15-x86_64-3.7
creating build/temp.macosx-10.15-x86_64-3.7/pyobjus
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c pyobjus/pyobjus.c -o build/temp.macosx-10.15-x86_64-3.7/pyobjus/pyobjus.o
In file included from pyobjus/pyobjus.c:608:
pyobjus/_runtime.h:33:23: error: too many arguments to function call, expected 0, have 2
return objc_msgSend(pool, sel_registerName("init"));
~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
OBJC_EXPORT void
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
# define OBJC_EXPORT OBJC_EXTERN OBJC_VISIBLE
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
# define OBJC_EXTERN extern
^
In file included from pyobjus/pyobjus.c:608:
pyobjus/_runtime.h:37:22: error: too many arguments to function call, expected 0, have 2
(void)objc_msgSend(pool, sel_registerName("drain"));
~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
OBJC_EXPORT void
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
# define OBJC_EXPORT OBJC_EXTERN OBJC_VISIBLE
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
# define OBJC_EXTERN extern
^
pyobjus/pyobjus.c:24583:25: error: too many arguments to function call, expected 0, have 2
(void)(objc_msgSend(__pyx_v_self->o_instance, sel_registerName(((char *)"release"))));
~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
OBJC_EXPORT void
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
# define OBJC_EXPORT OBJC_EXTERN OBJC_VISIBLE
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
# define OBJC_EXTERN extern
^
pyobjus/pyobjus.c:24660:45: error: too many arguments to function call, expected 0, have 2
__pyx_v_self->o_instance = objc_msgSend(__pyx_v_self->o_instance, sel_registerName(((char *)"retain")));
~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
OBJC_EXPORT void
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
# define OBJC_EXPORT OBJC_EXTERN OBJC_VISIBLE
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
# define OBJC_EXTERN extern
^
4 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-install-_8mr0nf3/pyobjus/setup.py'"'"'; __file__='"'"'/private/var/folders/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-install-_8mr0nf3/pyobjus/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/7z/tyb3y9hd2b30lg4fml_bwf880000gn/T/pip-record-8ig0oedo/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/pyobjus Check the logs for full command output.
temitayoadefemi@Temitayos-MacBook-Air ~ %
Mmm, that's an old issue to me.
How about pip3 install https://github.com/kivy/pyobjus/archive/master.zip
?
Thank you, ive installed it but when i open my app on IOS it tells me, no module named pyobjus and also when i run ./toolchain.py` pip3 install https://github.com/kivy/pyobjus/archive/master.zip
I get this error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-req-build-xzf8wy7y/setup.py'"'"'; __file__='"'"'/private/tmp/pip-req-build-xzf8wy7y/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/tmp/pip-wheel-8oilt8ge
cwd: /private/tmp/pip-req-build-xzf8wy7y/
Complete output (24 lines):
Pyobjus platform is darwin
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.15-x86_64-3.7
creating build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/dylib_manager.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/protocols.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
copying pyobjus/objc_py_types.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus
creating build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
copying pyobjus/consts/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
copying pyobjus/consts/corebluetooth.py -> build/lib.macosx-10.15-x86_64-3.7/pyobjus/consts
running build_ext
cythoning pyobjus/pyobjus.pyx to pyobjus/pyobjus.c
/usr/local/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/tmp/pip-req-build-xzf8wy7y/pyobjus/pyobjus.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pyobjus' extension
creating build/temp.macosx-10.15-x86_64-3.7
creating build/temp.macosx-10.15-x86_64-3.7/pyobjus
/bin/false -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c pyobjus/pyobjus.c -o build/temp.macosx-10.15-x86_64-3.7/pyobjus/pyobjus.o
unable to execute '/bin/false': No such file or directory
error: command '/bin/false' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pyobjus
Running setup.py clean for pyobjus
Failed to build pyobjus
Installing collected packages: pyobjus
Running setup.py install for pyobjus ... error
ERROR: Command errored out with exit status 1:
Ill appreciate if you can help me with this
Uh, if you're using it for the iOS
app, that pip3 install pyobjus
you did on your system wasn't needed.
pyobjus
isn't a plain python package, so couldn't be installed via python3 toolchain.py pip install pyobjus
but, instead, you should use python3 toolchain.py build pyobjus
I've built it, i even tried cleaning the recipes and building it again, the xcode project still tells me No module named pyobjus
Here is it bro, Thanks for your help
2020-04-26 15:40:00.369169+0100 pushnotification[1483:13325] [framework] CUIThemeStore: No theme registered with id=0
2020-04-26 15:40:00.568082+0100 pushnotification[1483:13325] Available orientation: KIVY_ORIENTATION=LandscapeLeft LandscapeRight Portrait PortraitUpsideDown
2020-04-26 15:40:00.568276+0100 pushnotification[1483:13325] Initializing python
/Users/temitayoadefemi/Library/Developer/CoreSimulator/Devices/56273F59-DFC2-4BA4-91AD-1F9E9525F093/data/Containers/Bundle/Application/2D109B08-2850-4BBF-96AB-15BF1C8AC467/pushnotification.app/pushnotification:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
2020-04-26 15:40:00.767679+0100 pushnotification[1483:13325] Running main.py: /Users/temitayoadefemi/Library/Developer/CoreSimulator/Devices/56273F59-DFC2-4BA4-91AD-1F9E9525F093/data/Containers/Bundle/Application/2D109B08-2850-4BBF-96AB-15BF1C8AC467/pushnotification.app/YourApp/main.pyc
[INFO ] [Kivy ] v2.0.0.dev0, git-a583d5d, 20200410
[INFO ] [Kivy ] Installed at "/Users/temitayoadefemi/Library/Developer/CoreSimulator/Devices/56273F59-DFC2-4BA4-91AD-1F9E9525F093/data/Containers/Bundle/Application/2D109B08-2850-4BBF-96AB-15BF1C8AC467/pushnotification.app/lib/python3.7/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.1 (default, Apr 10 2020, 19:33:51)
[Clang 10.0.1 (clang-1001.0.46.4)]
[INFO ] [Python ] Interpreter at "/Users/temitayoadefemi/Library/Developer/CoreSimulator/Devices/56273F59-DFC2-4BA4-91AD-1F9E9525F093/data/Containers/Bundle/Application/2D109B08-2850-4BBF-96AB-15BF1C8AC467/pushnotification.app/pushnotification"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_imageio, img_tex, img_gif (img_dds, img_sdl2, img_ffpyplayer, img_pil ignored)
[INFO ] [Text ] Provider: sdl2
Traceback (most recent call last):
File "/Users/temitayoadefemi/Desktop/kivy-ios/pushnotification-ios/YourApp/main.py", line 7, in <module>
ModuleNotFoundError: No module named 'pyobjus'
2020-04-26 15:40:02.300425+0100 pushnotification[1483:13325] Application quit abnormally!
2020-04-26 15:40:02.330667+0100 pushnotification[1483:13325] Leaving
I don't think that's a pyobjus
issue. Can you please close this issue, follow all the build instructions mentioned in kivy/kivy-ios
(Deleting your kivy-ios
folder and cloning it again) and ping us on Discord server if some help is needed?
Thank you! recloned and built it again and the problem was solved