# Sync problem on a Mac without Homebrew

**URL:** <https://discourse.psychopy.org/t/sync-problem-on-a-mac-without-homebrew/48009>\
**Category:** Online experiments\
**Created:** [September 29, 2026, 2:02pm UTC](https://discourse.psychopy.org/t/sync-problem-on-a-mac-without-homebrew/48009 "2026-09-29T14:02:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JensBoelte](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jensboelte/32/9060_2.png) [@JensBoelte](https://discourse.psychopy.org/u/JensBoelte)\
**Post date:** [September 29, 2026, 2:02pm UTC](https://discourse.psychopy.org/t/sync-problem-on-a-mac-without-homebrew/48009/1 "2026-09-29T14:02:48Z")

</div>

**OS** Mac Tahoe 26.7.1:  
**PsychoPy version** (e.g. 2026.2.4 Py 3.11):  
**What are you trying to achieve?:**

I am trying to sync an experiment with Pavlovia. However the sync-fails with an error message:

```auto
Traceback (most recent call last):
  File „/Applications/PsychoPy.app/Contents/Resources/lib/python3.11/psychopy_app/pavlovia_ui/project.py“, line 587, in sync
  File „/Applications/PsychoPy.app/Contents/Resources/lib/python3.11/psychopy_app/pavlovia_ui/project.py“, line 854, in syncProject
  File „/Applications/PsychoPy.app/Contents/Resources/lib/python3.11/psychopy/projects/pavlovia.py“, line 1012, in sync
  File „/Applications/PsychoPy.app/Contents/Resources/lib/python3.11/psychopy/projects/pavlovia.py“, line 1136, in repo
  File „/Applications/PsychoPy.app/Contents/Resources/lib/python3.11/psychopy/projects/pavlovia.py“, line 1206, in newRepo
NameError: name ‚git‘ is not defined

```

**What did you try to make it work?:**

- System git works: `/usr/bin/git --version` → `git version 2.54.0 (Apple Git-157)`
- Homebrew is not installed (institutional machine)!
- The PsychoPy log contains: `Failed to get Pavlovia project as Pavlovia works via git, which is not installed on this machine.`

In the Coder shell, `import git` gives the real (?) error. The git binary bundled inside the app cannot start because it is linked against a Homebrew library:

```auto
git.exc.GitCommandError: Cmd('/Applications/PsychoPy.app/Contents/Resources/git-core/git') failed due to: exit code(-6)
  cmdline: /Applications/PsychoPy.app/Contents/Resources/git-core/git version
  stderr: 'dyld: Library not loaded: /opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib
  Referenced from: /Applications/PsychoPy.app/Contents/Resources/git-core/git
  Reason: tried: '/opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib' (no such file) ...'
ImportError: Failed to initialize: ...

```

Setting `GIT_PYTHON_GIT_EXECUTABLE=/usr/bin/git` does not help for the app itself.

**Expected behavior**  
The standalone app should work without Homebrew, i.e. the bundled git should not depend on `/opt/homebrew`. Alternatively, the app could fall back to the system git if the bundled one fails.  
Has anyone else run into this, or is a fixed build available?

Thanks a lot Jens!

---

<div class="post-metadata">

**Author:** ![JensBoelte](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jensboelte/32/9060_2.png) [@JensBoelte](https://discourse.psychopy.org/u/JensBoelte)\
**Post date:** [September 30, 2026, 11:16am UTC](https://discourse.psychopy.org/t/sync-problem-on-a-mac-without-homebrew/48009/2 "2026-09-30T11:16:31Z")

</div>

Hi all,

I did a little more digging today using my second Mac. On a Mac without Homebrew, PsychoPy cannot create or sync Pavlovia projects, although the system git works. The same PsychoPy build works on another Mac that has Homebrew installed.

**Environment (identical on both Macs)**

- PsychoPy 2026.2.4, standalone app, installed in /Applications
- Apple Silicon (`uname -m` → arm64)
- macOS 26.7.1
- SHA-256 of the bundled git is identical on both machines: `shasum -a 256 /Applications/PsychoPy.app/Contents/Resources/git-core/git` → `c59dfe015f38d06ac810c6b372aa32be03faf36262e782060e17151a95cd042c`
- Mac A (fails): no Homebrew, `/opt/homebrew` does not exist. System git works (`/usr/bin/git --version` → Apple Git-157).
- Mac B (works): full Homebrew installation with `pcre2` and `gettext` in `/opt/homebrew/opt`.

**Symptoms on Mac A**  
Login to Pavlovia works, but creating a project fails:

```auto
File ".../psychopy/projects/pavlovia.py", line 1206, in newRepo
NameError: name 'git' is not defined

```

**Cause**  
In the Coder shell, `import git` shows the underlying error. The git binary inside the app cannot start:

```auto
git.exc.GitCommandError: Cmd('/Applications/PsychoPy.app/Contents/Resources/git-core/git') failed due to: exit code(-6)
  cmdline: /Applications/PsychoPy.app/Contents/Resources/git-core/git version
  stderr: 'dyld: Library not loaded: /opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib
  Referenced from: /Applications/PsychoPy.app/Contents/Resources/git-core/git
  Reason: tried: '/opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib' (no such file) ...'
ImportError: Failed to initialize: ...

```

`otool -L` on the bundled git shows two absolute Homebrew dependencies:

```auto
/opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib
/opt/homebrew/opt/gettext/lib/libintl.8.dylib

```

So the bundled git looks like a regular Homebrew git that was copied into the app without its libraries (or without relinking them via `@rpath`/`@executable_path`). It only works if Homebrew provides `pcre2` and `gettext` at exactly these paths. PsychoPy then reports the `ImportError` as “git is not installed”, which is misleading, because git is present on the system and only the bundled copy fails to start.

Setting `GIT_PYTHON_GIT_EXECUTABLE=/usr/bin/git` in the shell does not help for the app itself.

**Expected behavior**  
The standalone app should work without Homebrew. Possible fixes:

1. Bundle the required libraries with git and relink them to relative paths (e.g. with `dylibbundler` or `install_name_tool`), or build git statically.
2. Fall back to the system git (`/usr/bin/git`) if the bundled one fails to start.
3. At least show the real error (e.g. “bundled git failed to start: Library not loaded …”) instead of “git is not installed”.

I’m happy to test a fixed build or help with a pull request if that is useful. Has anyone else run into this?

Best wishes Jens

---

<div class="post-metadata">

**Author:** ![jon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jon/32/22_2.png) [@jon](https://discourse.psychopy.org/u/jon)\
**Post date:** [October 8, 2026, 1:25pm UTC](https://discourse.psychopy.org/t/sync-problem-on-a-mac-without-homebrew/48009/3 "2026-10-08T13:25:14Z")

</div>

Thanks Jens,

That’s good information, especially because I recently came across this on a student’s mac and couldn’t work out what was different about their machine. So this might explain it.

You’re right that the package macos app includes git-core from a homebrew installation. It’s the fastest way of getting around the issue of macos installing the developer tools which take ages. I’m not quite sure why this has only broken recently though (we’ve been doing that for years).

Anyway, working on how to fix it, on a machine that doesn’t have git installed via homebrew, do these files simply not exist (in which case we need to copy them into the installation), or are there system versions that we could potentially link to instead?

thanks,  
Jon

---

<div class="post-metadata">

**Author:** ![JensBoelte](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jensboelte/32/9060_2.png) [@JensBoelte](https://discourse.psychopy.org/u/JensBoelte)\
**Post date:** [October 8, 2026, 2:43pm UTC](https://discourse.psychopy.org/t/sync-problem-on-a-mac-without-homebrew/48009/4 "2026-10-08T14:43:40Z")

</div>

Hello @Jon

thanks for looking into this. Here is what I found on the affected machine (arm64, macOS 26.7.1, PsychoPy 2026.2.4, no Homebrew):

- `/opt/homebrew` does not exist, so the files are simply missing. The bundled `git-core/git` links to `/opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib` and `/opt/homebrew/opt/gettext/lib/libintl.8.dylib` (`otool -L`).
- Command Line Tools are installed here (`xcode-select -p` → `/Library/Developer/CommandLineTools`). Apple’s git (`/Library/Developer/CommandLineTools/usr/bin/git`) links only to system libraries (`libz`, `libiconv`, `libSystem`, CoreFoundation, CoreServices), so it needs neither pcre2 nor libintl.
- macOS provides its own `/usr/lib/libpcre2-8.dylib`, but nothing for libintl.

Happy to test a build on my machine.

Best,  
Jens
