Mac(M2)安装sphinx

Mac(M2)安装sphinx

链接: sphinx官方文档

根据文档提示,我们选择通过brew方式安装sphinx,这里需要先安装brew

链接: 如何安装brew

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

.....
==> Pouring sqlite-3.46.1.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/sqlite/3.46.1: 12 files, 4.8MB
==> Installing sphinx-doc dependency: xz
==> Pouring xz-5.6.2.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/xz/5.6.2: 96 files, 1.9MB
==> Installing sphinx-doc dependency: python@3.12
==> Pouring python@3.12-3.12.6.arm64_sonoma.bottle.tar.gz
==> /opt/homebrew/Cellar/python@3.12/3.12.6/bin/python3.12 -Im ensurepip
==> /opt/homebrew/Cellar/python@3.12/3.12.6/bin/python3.12 -Im pip install -v --no-index --upgrade --isolated --target=/opt/homebrew/lib/pyth
🍺  /opt/homebrew/Cellar/python@3.12/3.12.6: 3,263 files, 65.3MB
==> Installing sphinx-doc
==> Pouring sphinx-doc-8.0.2.arm64_sonoma.bottle.tar.gz
==> Caveats
sphinx-doc is keg-only, which means it was not symlinked into /opt/homebrew,
because this formula is mainly used internally by other formulae.
Users are advised to use `pip` to install sphinx-doc.

If you need to have sphinx-doc first in your PATH, run:
  echo 'export PATH="/opt/homebrew/opt/sphinx-doc/bin:$PATH"' >> ~/.zshrc
==> Summary
🍺  /opt/homebrew/Cellar/sphinx-doc/8.0.2: 3,079 files, 52.2MB
==> Running `brew cleanup sphinx-doc`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> sphinx-doc
sphinx-doc is keg-only, which means it was not symlinked into /opt/homebrew,
because this formula is mainly used internally by other formulae.
Users are advised to use `pip` to install sphinx-doc.

If you need to have sphinx-doc first in your PATH, run:
  echo 'export PATH="/opt/homebrew/opt/sphinx-doc/bin:$PATH"' >> ~/.zshrc

这里注意,通过brew安装的sphin是没有将可执行文件安装到系统环境变量里面去的,根据最后一句话提示,执行如下命令

echo 'export PATH="/opt/homebrew/opt/sphinx-doc/bin:$PATH"' >> ~/.zshrc

重启命令行终端,查看sphinx 版本信息,正常输出版本信息即为安装完毕

sphinx-build --version
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值