Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI check to install with homebrew on macos #7005

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jtpio
Copy link
Member

@jtpio jtpio commented Aug 9, 2023

Troubleshoot #6974

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Binder 👈 Launch a Binder on branch jtpio/notebook/brew-issue

@jtpio
Copy link
Member Author

jtpio commented Aug 9, 2023

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

image

If you would like to double check to see if you have something similar locally.

@defjaf
Copy link

defjaf commented Aug 9, 2023

@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.

@jtpio
Copy link
Member Author

jtpio commented Aug 9, 2023

@defjaf
Copy link

defjaf commented Aug 9, 2023

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.

@defjaf
Copy link

defjaf commented Aug 9, 2023

@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?

@jtpio
Copy link
Member Author

jtpio commented Aug 9, 2023

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.

@defjaf
Copy link

defjaf commented Aug 9, 2023

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?

@defjaf
Copy link

defjaf commented Aug 11, 2023

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.

@defjaf
Copy link

defjaf commented Aug 15, 2023

Seems like the CI machines are running on Intel, and that the same issues do not arise in that case, according to #7006.

@defjaf
Copy link

defjaf commented Aug 17, 2023

see #7006 (comment) for information about running in a venv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants