question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`pip install pyobjus` fails on Mac OSX

See original GitHub issue

Running pip install pyobjus fails on mac with the following errors:

(mb_pc_env) Vik-MBP:multibeam_pointcloud_correction vik748$ pip install pyobjus
Collecting pyobjus
  Using cached https://files.pythonhosted.org/packages/cb/9e/6425d66cf66892ee99ebdc86204c825d6817458328b6cdc3a6c51ad152d1/pyobjus-1.1.0.tar.gz
Building wheels for collected packages: pyobjus
  Running setup.py bdist_wheel for pyobjus ... error
  Complete output from command /Users/vik748/anaconda3/envs/mb_pc_env/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/qq/p75542c55gz41w8ycl_crgq40000gn/T/pip-install-6mtj74f6/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/qq/p75542c55gz41w8ycl_crgq40000gn/T/pip-wheel-ldrgr6ie --python-tag cp35:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.6-x86_64-3.5
  copying setup.py -> build/lib.macosx-10.6-x86_64-3.5
  creating build/lib.macosx-10.6-x86_64-3.5/pyobjus
  copying pyobjus/dylib_manager.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus
  copying pyobjus/protocols.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus
  copying pyobjus/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus
  copying pyobjus/objc_py_types.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus
  creating build/lib.macosx-10.6-x86_64-3.5/pyobjus/consts
  copying pyobjus/consts/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus/consts
  copying pyobjus/consts/corebluetooth.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus/consts
  running build_ext
  cythoning pyobjus/pyobjus.pyx to pyobjus/pyobjus.c
  /Users/vik748/anaconda3/envs/mb_pc_env/lib/python3.5/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/qq/p75542c55gz41w8ycl_crgq40000gn/T/pip-install-6mtj74f6/pyobjus/pyobjus/pyobjus.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  building 'pyobjus' extension
  creating build/temp.macosx-10.6-x86_64-3.5
  creating build/temp.macosx-10.6-x86_64-3.5/pyobjus
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/vik748/anaconda3/envs/mb_pc_env/include -arch x86_64 -I/Users/vik748/anaconda3/envs/mb_pc_env/include/python3.5m -c pyobjus/pyobjus.c -o build/temp.macosx-10.6-x86_64-3.5/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/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
  OBJC_EXPORT void
  ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.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/MacOSX.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/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
  OBJC_EXPORT void
  ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.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/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
  #       define OBJC_EXTERN extern
                             ^
  pyobjus/pyobjus.c:24591: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/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
  OBJC_EXPORT void
  ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.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/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
  #       define OBJC_EXTERN extern
                             ^
  pyobjus/pyobjus.c:24668: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/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
  OBJC_EXPORT void
  ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.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/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
  #       define OBJC_EXTERN extern
                             ^
  4 errors generated.
  error: command 'gcc' failed with exit status 1
  
  ----------------------------------------
  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
    Complete output from command /Users/vik748/anaconda3/envs/mb_pc_env/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/qq/p75542c55gz41w8ycl_crgq40000gn/T/pip-install-6mtj74f6/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/qq/p75542c55gz41w8ycl_crgq40000gn/T/pip-record-5jpuhtqs/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-x86_64-3.5
    copying setup.py -> build/lib.macosx-10.6-x86_64-3.5
    creating build/lib.macosx-10.6-x86_64-3.5/pyobjus
    copying pyobjus/dylib_manager.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus
    copying pyobjus/protocols.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus
    copying pyobjus/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus
    copying pyobjus/objc_py_types.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus
    creating build/lib.macosx-10.6-x86_64-3.5/pyobjus/consts
    copying pyobjus/consts/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus/consts
    copying pyobjus/consts/corebluetooth.py -> build/lib.macosx-10.6-x86_64-3.5/pyobjus/consts
    running build_ext
    skipping 'pyobjus/pyobjus.c' Cython extension (up-to-date)
    building 'pyobjus' extension
    creating build/temp.macosx-10.6-x86_64-3.5
    creating build/temp.macosx-10.6-x86_64-3.5/pyobjus
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/vik748/anaconda3/envs/mb_pc_env/include -arch x86_64 -I/Users/vik748/anaconda3/envs/mb_pc_env/include/python3.5m -c pyobjus/pyobjus.c -o build/temp.macosx-10.6-x86_64-3.5/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/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
    OBJC_EXPORT void
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.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/MacOSX.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/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
    OBJC_EXPORT void
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.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/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
    #       define OBJC_EXTERN extern
                               ^
    pyobjus/pyobjus.c:24591: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/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
    OBJC_EXPORT void
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.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/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
    #       define OBJC_EXTERN extern
                               ^
    pyobjus/pyobjus.c:24668: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/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
    OBJC_EXPORT void
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.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/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
    #       define OBJC_EXTERN extern
                               ^
    4 errors generated.
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
pippyncommented, May 25, 2020

what worked for me was: download the zip of the repo and unzip. Open the pyobjus folder in terminal and run this command: python setup.py install

2reactions
sanderlandcommented, Jun 8, 2020

@vik748. Thanks, but it works for you. So it’s really just sanderlands issues that are unresolved?

He installed from master, not pypi, so I assume it’s fixed and just not released. Hence my suggestion of releasing said fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install pyobjus on Mac 10.15.3 with Python 3.6.5
When I run python3 -m pip install pyobjus, the following error occurs: ... copying pyobjus/protocols.py -> build/lib.macosx-10.13-x86_64-3.6/pyobjus.
Read more >
Error: Installing PyObjus kivy - Stack Overflow
I'm installing PyObjus: sudo python setup.py install-> logging command: ... build/temp.macosx-10.9-intel-2.7/pyobjus/pyobjus.o clang: error: ...
Read more >
pyobjus - PyPI
1. pip install pyobjus. Copy PIP instructions. Latest version. Released: Mar 26, 2022.
Read more >
Installing - pyOCD
PyOCD requires Python 3.6 or later. It runs on macOS, Linux, FreeBSD, and Windows platforms. The latest pyOCD package is available on PyPI....
Read more >
linux mint - Terminal and other services do not work
Here is the error when trying to install, I copy it in case it is linked ... in <module> File "/tmp/pip-install-5da9i7i5/pyobjus/setup.py", ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found