# 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:** 9\
**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

---

<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 23, 2026, 10:09am UTC](https://discourse.psychopy.org/t/sync-problem-on-a-mac-without-homebrew/48009/5 "2026-10-23T10:09:33Z")

</div>

Hi Jens,

So, I’ve gone ahead with

- copying in the pcre2 and libintl dylibs
- relinked from all the existing git binaries that we package
- resigned all affected files

You could test on this download if you get a chance?

> **[StandalonePsychoPy-2026.2.5rc24-macOS-arm64-3.11.dmg](https://drive.google.com/file/d/1KuNIqJSrkFsRz-WHqbTXdoNmwNFhgOT7/view?usp=drive_fs)**
>
> Google Drive file.

(Note that google drive will warn you that it can’t vouch for this file as it’s too big to scan at google. You can scan it yourself though, and you can see that code signature should match our regular Open Science Tools Ltd. signature)

best wishes,  
Jon

---

<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 23, 2026, 1:50pm UTC](https://discourse.psychopy.org/t/sync-problem-on-a-mac-without-homebrew/48009/6 "2026-10-23T13:50:39Z")

</div>

I just tested this on a completely clean Tahoe virtual machine. It created and synced a new project without problem so I think we’re good.

Interestingly, even though we have successfully packaged git fully in the app, it STILL announced it would fetch and install Developer Tools. So somehow it had detected there had been a call to git 🤷. BUT on the plus side, this was after PsychoPy had done its sync, on a background dialog box that I only saw when I shut down PsychoPy, so it doesn’t slow down the first-use (e.g. with an undergraduate lab class 😬 ). Studio, on the other hand, doesn’t do this at all because it never mentions “git”

So we’re about to release 2026.2.5 and this will be fixed there I believe.

Thanks for your detective work

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 25, 2026, 11:30am UTC](https://discourse.psychopy.org/t/sync-problem-on-a-mac-without-homebrew/48009/7 "2026-10-25T11:30:20Z")

</div>

Hello @Jon

I had to rename the branch that I had created and synced manually from ‘main’ to ‘master’, but then everything worked.

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 26, 2026, 4:11pm UTC](https://discourse.psychopy.org/t/sync-problem-on-a-mac-without-homebrew/48009/8 "2026-10-26T16:11:08Z")

</div>

@TParsons did do some work recently to better handle the main/master option (to use the default branch rather than specify a name) but I forget whether that fix was only being applied to Studio and/or only for the 2027.1 release if it felt like a major change. I wonder if the new GitLab update to Pavlovia means that the default is now `main`

---

<div class="post-metadata">

**Author:** ![TParsons](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/tparsons/32/8301_2.png) [@TParsons](https://discourse.psychopy.org/u/TParsons)\
**Post date:** [October 28, 2026, 11:12am UTC](https://discourse.psychopy.org/t/sync-problem-on-a-mac-without-homebrew/48009/9 "2026-10-28T11:12:56Z")

</div>

We handle main/master slightly differently in Studio vs Standalone…

### Studio

We don’t specify a branch name at all, meaning that:

- Cloning a project from Pavlovia (a feature which isn’t tremendously visible, but we’re working on it for 2027.1) will get whatever is specified as the main branch
- Creating a project in Studio will use the default name (`master`, [according to ismorphic-git](https://isomorphic-git.org/docs/en/init), the package Studio uses for git)
- Syncing will use the currently checked out branch

This works regardless of your remote branch name, but if you create a project in Studio then manually rename the main branch via command line, you’d need to manually checkout the new branch name via command line.

### Standalone

We specify the name `master` on push and pull but not clone, meaning that:

- Cloning a project from Pavlovia will get whatever is specified as the main branch, same as Studio
- Creating a project in Standalone will use `master`
- Syncing will use `master`

This works for users who are both creating and syncing from PsychoPy (and because the default name for Studio is still `master`, it works between the two apps; you can create a project in Standalone and sync with Studio, and vice versa), but if you created a project outside of PsychoPy (i.e. command line as you did) then it’ll get the default branch name, which is `main` [as of GitLab 14.0](https://about.gitlab.com/blog/new-git-default-branch-name/), and then won’t be sync-able to Standalone until you rename it to `master`.
