Keep getting this error when trying to clone my Github repos. Any help would be appreciated! I am running on MacOS (M1)
Couldn't posix_spawn: error 2
Since macOS 12.3 removed the built-in Python@2.x, Sourcetree cannot open Mercurial projects normally after system upgrade.
Guess the reason is that the built-in Mercurial of Sourcetree depends on the built-in Python2 of macOS, but Python2 was removed, so it throws an error.
The solution is as follows:
1. Open Sourcetree preferences and switch to the Mercurial tab.
You can see the error message from Mercurial Version: Embedded Mercurial Couldn't posix_spawn: error 2.
2. Select Use System Mercurial,path like: /usr/local/Cellar/mercurial/6.1/lib/python3.10/site-packages/mercurial.
Choose according to the version of Mercurial you have installed. If you installed Mercurial using Homebrew, you can find its path through brew list mercurial.
That's it.
Same problem.
Mine magically fixed itself after adding an existing local repo. If it wasn't that then idk what fixed it.
Same problem, I still can't fix this problem after adding the existing local repo on macOS 12.4 Apple M1 and SourceTree 4.1.8 (244).
And I get the 'not found' error when I choose the mercurial location from brew. I guess SourceTree don't support Mercurial 6.1.3 by Python 3.8.9.
Looks like official noticed this problem: https://jira.atlassian.com/browse/SRCTREE-7867. Let's look forward to hearing from their good news.
Same here. Looks like a recent MacOS update causes the issue.
Yes, I have M1 and macOS 12.3
Has anyone reported the issue to Atlassian? Otherwise it will take forever to get it fixed.
Your turn. )
Me too, after upgrading macOS 12.3, opening the Mercurial project in sourcetree will report an error. But the Git project works fine.
Same problem after upgrading to 12.3... I am still on Intel. Git works, Mercurial does not
it's actually related to the fact that Apple seems to have upgraded the default python to version 3 (at last).
But that breaks any hg (also on the command line).
On command line I can fix it by installing mercurial 6.1, but I cannot select that version as the external mercurial... Sourcetree reports 'mercurial not found in selected folder?)
This doesn't seem to work. I get the same error using the Brew-installed version of Mercurial.
On my system it was installed at:
/opt/homebrew/Cellar/mercurial/6.1/lib/python3.10/site-packages/mercurial/
...but once I select that folder in SourceTree, it says the same error: "System Mercurial Couldn't posix_spawn: error 2"
Maybe it's still trying to use Python 2.7 still instead of Python 3.10?
Worked for me!
same problem. what is the solution? thanks
thanks!
It looks like you're new here. Sign in or register to get started.