I'm using Mac OS: High Sierra: 10.13.6, and my understanding of Terminal is very limited as I am an eager beginner.
Starting from the beginning of my attempt: I first attempted to use pip3
to install PyGObject
. However, this failed with:
ERROR: Command errored out with exit status 1:
command: /Users/Tyler/.pyenv/versions/3.7.3/bin/python3.7 /Users/Tyler/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/dd/9fgky8s10l569qd01qvwpvxh0000gn/T/tmp38e67qsx
cwd: /private/var/folders/dd/9fgky8s10l569qd01qvwpvxh0000gn/T/pip-install-xhr95ubc/pygobject_0051309210034fd284903e60ab3ede2a
Complete output (39 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.13-x86_64-3.7
creating build/lib.macosx-10.13-x86_64-3.7/pygtkcompat
copying pygtkcompat/pygtkcompat.py -> build/lib.macosx-10.13-x86_64-3.7/pygtkcompat
copying pygtkcompat/__init__.py -> build/lib.macosx-10.13-x86_64-3.7/pygtkcompat
"many other copying statements - though it was unnecessary so deleted (ME)"
copying gi/overrides/Gio.py -> build/lib.macosx-10.13-x86_64-3.7/gi/overrides
copying gi/overrides/keysyms.py -> build/lib.macosx-10.13-x86_64-3.7/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
After this I discovered brew
. I run the code here and everything appears to be up to date:
tylers-macbook-pro:~ Tyler$ brew install pygobject3 gtk+3
Updating Homebrew...
Warning: pygobject3 3.38.0_1 is already installed and up-to-date
To reinstall 3.38.0_1, run `brew reinstall pygobject3`
Warning: gtk+3 3.24.24 is already installed and up-to-date
To reinstall 3.24.24, run `brew reinstall gtk+3`
I am still unable to import the gi
module from terminal:
tylers-macbook-pro:~ Tyler$ python
Python 3.7.3 (default, Dec 28 2020, 16:08:31)
[Clang 10.0.0 (clang-1000.10.44.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> import gi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'gi'
>>>
I have found that the packages installed by HomeBrew
are at:
/Users/Tyler/Library/Caches/Homebrew
From my reading, I believe that the last post here could be the solution or part of it, however, my skill and understanding of my computer is stopping me from "giving it a go" as I may destroy something that I do not know how to put back together. I also acknowledge that I have an early 2011 MacBook pro that I have spiced up with an SSD and more RAM. However, Apple no longer allows me to update my computer much to my disappointment.