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

Mac Os X Mojave - Building wheel for PyGObject (PEP 517) ... error #287

Closed
SoapyFridge opened this issue Apr 8, 2021 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@SoapyFridge
Copy link

Mac Os X Mojave

N/A

Can not install PyGObject, can not install Tartube:

Collecting PyGObject
  Using cached PyGObject-3.40.1.tar.gz (714 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: pycairo>=1.16.0 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from PyGObject) (1.20.0)
Building wheels for collected packages: PyGObject
  Building wheel for PyGObject (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/tmp8fsz8r_4
       cwd: /private/var/folders/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-install-q3qwt7dz/pygobject_47e21d9702764d3e9abda7fda369a9de
  Complete output (39 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.9
  creating build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
  copying pygtkcompat/pygtkcompat.py -> build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
  copying pygtkcompat/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
  copying pygtkcompat/generictreemodel.py -> build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
  creating build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_signalhelper.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_constants.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/pygtkcompat.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_ossighelper.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/importer.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_error.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_gtktemplate.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_propertyhelper.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/types.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/docstring.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_option.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/module.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  creating build/lib.macosx-10.9-x86_64-3.9/gi/repository
  copying gi/repository/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/gi/repository
  creating build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/GIMarshallingTests.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/Gdk.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/Pango.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/GdkPixbuf.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/Gtk.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/GLib.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/GObject.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/Gio.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/keysyms.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  running build_ext
  Requested 'libffi >= 3.0' but version of libffi is 2.1
  Command '('pkg-config', '--print-errors', '--exists', 'libffi >= 3.0')' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for PyGObject
Failed to build PyGObject
ERROR: Could not build wheels for PyGObject which use PEP 517 and cannot be installed directly
@SoapyFridge SoapyFridge added the bug Something isn't working label Apr 8, 2021
@axcore
Copy link
Owner

axcore commented Apr 8, 2021

I googled the error, this thread suggests a couple of solutions.

I don't have a Mac, so it's difficult for me to help MacOS users.

@Lod3
Copy link

Lod3 commented Apr 8, 2021

We also googled, we tried python3 -m pip install --no-use-pep517 PyGObject
This produced this output:

python3 -m pip install --no-use-pep517 PyGObject
Collecting PyGObject
 Using cached PyGObject-3.40.1.tar.gz (714 kB)
Requirement already satisfied: pycairo>=1.16.0 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from PyGObject) (1.20.0)
Building wheels for collected packages: PyGObject
 Building wheel for PyGObject (setup.py) ... error
 ERROR: Command errored out with exit status 1:
  command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-install-rajq7ifs/pygobject_1bcae2580300445398e79df1917b25d0/setup.py'"'"'; _file_='"'"'/private/var/folders/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-install-rajq7ifs/pygobject_1bcae2580300445398e79df1917b25d0/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/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-wheel-n9d9xhzf
    cwd: /private/var/folders/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-install-rajq7ifs/pygobject_1bcae2580300445398e79df1917b25d0/
 Complete output (39 lines):
 running bdist_wheel
 running build
 running build_py
 creating build
 creating build/lib.macosx-10.9-x86_64-3.9
 creating build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
 copying pygtkcompat/pygtkcompat.py -> build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
 copying pygtkcompat/_init_.py -> build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
 copying pygtkcompat/generictreemodel.py -> build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
 creating build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/_signalhelper.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/_constants.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/pygtkcompat.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/_ossighelper.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/importer.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/_error.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/_gtktemplate.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/_propertyhelper.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/_init_.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/types.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/docstring.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/_option.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 copying gi/module.py -> build/lib.macosx-10.9-x86_64-3.9/gi
 creating build/lib.macosx-10.9-x86_64-3.9/gi/repository
 copying gi/repository/_init_.py -> build/lib.macosx-10.9-x86_64-3.9/gi/repository
 creating build/lib.macosx-10.9-x86_64-3.9/gi/overrides
 copying gi/overrides/GIMarshallingTests.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
 copying gi/overrides/Gdk.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
 copying gi/overrides/Pango.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
 copying gi/overrides/GdkPixbuf.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
 copying gi/overrides/Gtk.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
 copying gi/overrides/_init_.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
 copying gi/overrides/GLib.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
 copying gi/overrides/GObject.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
 copying gi/overrides/Gio.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
 copying gi/overrides/keysyms.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
 running build_ext
 Requested 'libffi >= 3.0' but version of libffi is 2.1
 Command '('pkg-config', '--print-errors', '--exists', 'libffi >= 3.0')' returned non-zero exit status 1.
 ----------------------------------------
 ERROR: Failed building wheel for PyGObject
 Running setup.py clean for PyGObject
Failed to build PyGObject
Installing collected packages: PyGObject
  Running setup.py install for PyGObject ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-install-rajq7ifs/pygobject_1bcae2580300445398e79df1917b25d0/setup.py'"'"'; _file_='"'"'/private/var/folders/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-install-rajq7ifs/pygobject_1bcae2580300445398e79df1917b25d0/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/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-record-f_802z5e/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/PyGObject
     cwd: /private/var/folders/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-install-rajq7ifs/pygobject_1bcae2580300445398e79df1917b25d0/
  Complete output (39 lines):
  running install
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.9
  creating build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
  copying pygtkcompat/pygtkcompat.py -> build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
  copying pygtkcompat/_init_.py -> build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
  copying pygtkcompat/generictreemodel.py -> build/lib.macosx-10.9-x86_64-3.9/pygtkcompat
  creating build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_signalhelper.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_constants.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/pygtkcompat.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_ossighelper.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/importer.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_error.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_gtktemplate.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_propertyhelper.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_init_.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/types.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/docstring.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/_option.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  copying gi/module.py -> build/lib.macosx-10.9-x86_64-3.9/gi
  creating build/lib.macosx-10.9-x86_64-3.9/gi/repository
  copying gi/repository/_init_.py -> build/lib.macosx-10.9-x86_64-3.9/gi/repository
  creating build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/GIMarshallingTests.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/Gdk.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/Pango.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/GdkPixbuf.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/Gtk.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/_init_.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/GLib.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/GObject.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/Gio.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  copying gi/overrides/keysyms.py -> build/lib.macosx-10.9-x86_64-3.9/gi/overrides
  running build_ext
  Requested 'libffi >= 3.0' but version of libffi is 2.1
  Command '('pkg-config', '--print-errors', '--exists', 'libffi >= 3.0')' returned non-zero exit status 1.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-install-rajq7ifs/pygobject_1bcae2580300445398e79df1917b25d0/setup.py'"'"'; _file_='"'"'/private/var/folders/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-install-rajq7ifs/pygobject_1bcae2580300445398e79df1917b25d0/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/ks/3cbpc8h118zcx79tpgjz6l4h0000gp/T/pip-record-f_802z5e/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/PyGObject Check the logs for full command output.

@Lod3
Copy link

Lod3 commented Apr 8, 2021

Will try upgrading libffi asap

@SoapyFridge
Copy link
Author

Tried to install and reinstall libffi and got the following:

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
cadence-workflow
==> Updated Formulae
Updated 21 formulae.
==> Updated Casks
Updated 3 casks.

Warning: libffi 3.3_3 is already installed and up-to-date.
To reinstall 3.3_3, run:
  brew reinstall libffi

Next we tried to run the following command with the same error output as above:

python3 -m pip install --no-use-pep517 PyGObject

@nvanderperren
Copy link

I found a solution for this issue.

You do: brew reinstall libffi. If installation is succesful, you get a message of brew, saying:
For pkg-config to find libffi you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"

So then you do export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"

From then on, it's possible to do python3 -m pip install PyGObject and follow the rest of the installation instructions.

@axcore
Copy link
Owner

axcore commented Apr 1, 2022

All macOS installation problems have been consolidated into one issue, #393.

@axcore axcore closed this as completed Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants