<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 7 Jul 2020 at 15:18, Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div>  "Any Python package that you install with brew will install the Homebrew Python build."</div><div><br></div>  Sure in general with python on Apple, but you ignored my statement:  <div><br></div><div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ which sphinx-build</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">/usr/local/opt/sphinx-doc/bin/sphinx-build</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">~/Src/petsc/src/ksp/ksp/interface</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(200,20,201)"><b> (master=)</b></span><span style="font-variant-ligatures:no-common-ligatures"> arch-master</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ more /usr/local/opt/sphinx-doc/bin/sphinx-build</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">#!/usr/local/Cellar/sphinx-doc/3.0.4/libexec/bin/python3.8</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"># -*- coding: utf-8 -*-</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import re</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import sys</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">from sphinx.cmd.build import main</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">sphinx seems to be carrying around its own python internally, thus quite rightly getting Jed upset about packaging on Apple of open source software.  Or perhaps I misunderstand that line.</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div></div></div></blockquote><div><br></div><div>Oh, sorry, now I understand what you mean! You are right, but anyway you still have a bit of mess around:</div><div><br></div><div>1) Run `brew info sphinx-doc` and read the "Caveats" section. Long story short, that package is not meant to be used for regular users.</div><div>Get rid of it with `brew uninstall sphinx-doc`. Open a new terminal and make sure you don't have /usr/local/opt/sphinx-doc/bin from $PATH.</div><div><br></div><div>2) Install Homebrew Python with `brew install python` (or maybe python3, do not remember right now, but "python" should be enough). </div><div>Or try `brew upgrade python` if you are in py3.7, this way you should get py3.8.</div><div>Consider symlinking python3 -> python in /usr/local/bin (or maybe ~/bin, if you prefer).</div><div>Otherwise, if you do not symlink, you will forget and keep using plain "python" in the command line, and that one will be EOLed system Apple Python 2.7.</div><div><br></div><div>3) Finally, just use pip to install sphinx `python3 -m pip install sphinx`. </div><div>Now `which sphinx-build` should point to /usr/local/bin.</div><div><br></div><div>PS: 99% of Python packages, and particularly the pure-Python ones, can  be installed with pip under Homebrew Python. Go this way ASAP and forget about system Apple Python.</div><div><br></div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div>