解决 Sourcetree 报错 Couldn't posix_spawn: error 2 问题

简介: 解决 Sourcetree 报错 Couldn't posix_spawn: error 2 问题

正文


前几天更新到 macOS 12.3 之后,Sourcetree 无法正常打开 Mercurial 的项目,猜测是跟 macOS 12.3 移除了内置的 Python2 有关。报错如下:


1.webp.jpg


在 ATLASSIAN Community 上也能找到相关的帖子,比如这篇:Couldn't posix_spawn: error 2,我也在上面留言了。


5.webp.jpg


其实,打开 Sourcetree 偏好设置可以看到报错原因了:


4.webp.jpg

其中有两个选项,前者意思是「使用内置的 Mercurial」,后者表示「使用系统安装的 Mercurial」。猜测是 Sourcetree 内置的 Mercurial 依赖了 macOS 系统内置的 Python2,但由于系统更新之后已彻底移除,所以就报错了(当前 Sourcetree 最新版本为 4.1.6,仍存在问题,目测后续版本会解决此问题)。


因此,解决思路也很简单,就是使用自行安装的 Mercurial 即可。


Use System Mercurial 处选择路径:/usr/local/Cellar/mercurial/6.1/lib/python3.10/site-packages/mercurial(根据自己安装的 Mercurial 版本及对应路径去选择)。


如果你是通过 Homebrew 安装 Mercurial 的话,可以使用 brew list mercurial 命令查看其路径。


3.webp.jpg


重新打开,就可以了,不再报错。


2.webp.jpg


The end.

目录
相关文章
|
9月前
|
数据库管理
SVN 执行cleanup报错:Cleanup failed to process the following paths : 解决方法
引用:https://www.cnblogs.com/pinpin/p/11395438.html 在SVN更新时提示文件被锁住了,要求执行 clean up操作,执行clean up时又报clean up failed。造成的原因是在某次更新后,点击了cancel按钮,操作没有完成所以会锁住。解决方法如下:
466 0
问题提解决:ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host=‘files.pythonhos
问题提解决:ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host=‘files.pythonhos
|
网络协议 安全 Linux
如何修复 SSH Client_loop: send disconnect: Broken pipe Error
如何修复 SSH Client_loop: send disconnect: Broken pipe Error
2011 1
|
10月前
|
Python Windows
Couldn't launch Python exit code 9009
start stable-diffusion-webui,发现,python 环境没有,我本地其实是已经安装完毕的,后来发现是因为 windows 的应用商店的快捷键,当你 CMD 命令行输入 python 的时候,会自动跳转到应用商店,然后你就会发现,你的 python 环境没有了,所以,需要将应用商店的快捷键去掉.
341 0
|
Python
Pycharm:Couldn't connect to console process.
Pycharm:Couldn't connect to console process.
203 0
Pycharm:Couldn't connect to console process.
|
网络安全 Windows
解决adb报错“failed to create fdevent interrupt socketpair: Invalid argument“问题
解决adb报错“failed to create fdevent interrupt socketpair: Invalid argument“问题
298 0
解决adb报错“failed to create fdevent interrupt socketpair: Invalid argument“问题
sed: 1: “s/os.remove(“/xx/xxx. ...“: invalid command code f
sed: 1: “s/os.remove(“/xx/xxx. ...“: invalid command code f
成功解决ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。backend_agg.cp36
成功解决ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。backend_agg.cp36
成功解决ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。backend_agg.cp36
|
Linux 网络安全
解决Linux下ssh登录后出现 报错 Write failed: Broken pipe 的方法
解决Linux下ssh登录后出现 报错 Write failed: Broken pipe 的方法解决也很简单,在执行 ssh 命令的时候,多加一个参数即可,如下: ssh -p 2200 -o ServerAliveInterval=60 root@8.
1824 0