notebook
notebook copied to clipboard
Add CI check to install with homebrew on `macos`
Troubleshoot https://github.com/jupyter/notebook/issues/6974
cc @defjaf
Here are the logs for the homebrew installation, which passes on CI: https://github.com/jupyter/notebook/actions/runs/5809598910/job/15748922126?pr=7005
If you would like to double check to see if you have something similar locally.
@jtpio
I get ~exactly the same~ a similar response from pip:
$ python3 -m pip install -vv notebook
Using pip 23.2.1 from /opt/homebrew/lib/python3.11/site-packages/pip (python 3.11)
Non-user install because site-packages writeable
Edit: But mine is actually using homebrew python, whereas yours is, I think, using the system python.
And the rest of the logs? https://github.com/jupyter/notebook/actions/runs/5809598910/job/15748922126?pr=7005
I admit it's pretty hard to parse what I've got...
So I attach a file with the console output from pip. Note that this is starting from having jupyterlab 3.6.3 and notebook 6.5.5 installed, so they are upgraded to 4.0.4 and 7.0.3 (but it didn't automatically upgrade other stuff). It does seem to have put a bunch of files below /opt/homebrew/share/jupyter/ but nothing new in /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/share/jupyter/. And I still get the schema console errors and the UI problems.
pip-install-notebook==7 output.txt
Comparing to the CI logs for this PR, I note that "/opt" only appears in "/opt/hostedtoolcache" and that "brew" appears in some environment variables, in "brew install python" and the name of the issue itself.
@jtpio Looking more carefully, even from the beginning of the logs, the CI is using /Library/Frameworks/Python.framework/... whereas my homebrew install is using /opt/homebrew/... — it looks like the CI build isn't using the homebrew python?
Maybe we could check whether it's possible to install under /opt/homebrew on CI.
And also add a Playwright test to check if the same schema errors appear in the browser console on CI.
Maybe we could check whether it's possible to install under /opt/homebrew on CI.
Well, I think the point is that the CI process isn't using the homebrew python and so not automatically picking up the homebrew paths like sys.prefix. Somehow the path and other variables need to be set; the usual way to do this is eval "$(/opt/homebrew/bin/brew shellenv)" before running any further commands (e.g., in .bashrc). Or can you write the script with a hard-coded python executable /opt/homebrew/bin/python3?
Or can you write the script with a hard-coded python executable
/opt/homebrew/bin/python3?
Or /usr/local/bin/python3 if the CI machines are intel.
Seems like the CI machines are running on Intel, and that the same issues do not arise in that case, according to https://github.com/jupyter/notebook/pull/7006.
see https://github.com/jupyter/notebook/pull/7006#issuecomment-1682181317 for information about running in a venv.