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

Correctly resolve Jupyter data/config dirs on Windows #89

Merged
merged 2 commits into from
Mar 21, 2025

Conversation

manzt
Copy link
Owner

@manzt manzt commented Mar 21, 2025

This PR simplifies how we set up Jupyter paths in juv run and should hopefully fix (#61).

Instead of creating a merged directory of Jupyter data files, we now just set JUPYTER_PATH and JUPYTER_CONFIG_PATH directly based on what's available in the current virtual environment. This works better across platforms and avoids the complexity of copying, linking, deleting files.

I think what is happening on Windows is that we weren’t correctly identifying the virtual environment root. Unix and Windows place site-packages at different depths, so the old logic would go up three levels regardless. Now we handle each case explicitly, which should make path resolution more reliable.

# Unix
<venv>/lib/pythonX.Y/site-packages/
<venv>/share/jupyter/
<venv>/etc/jupyter/

# Windows
<venv>/Lib/site-packages/
<venv>/share/jupyter/
<venv>/etc/jupyter/

I don't have a great way to test but would love if either @ATL2001 or @Jhsmit would give it a spin. I'm going to make a release either way, but would love to know if we can close #61.

manzt added 2 commits March 21, 2025 15:00
`juv run`

Simplifies setup by avoiding temporary merged Jupyter data dir.
Sets `JUPYTER_PATH` directly from known locations.
Should handle virtual env layout differences on Unix and Windows.
@manzt manzt changed the title Use JUPYTER_PATH instead of creating merged JUPYTER_DATA_DIR for juv run Correctly resolve Jupyter data/config dirs on Windows Mar 21, 2025
@manzt manzt added bug Something isn't working enhancement New feature or request labels Mar 21, 2025
@manzt manzt merged commit dc516c0 into main Mar 21, 2025
20 checks passed
@manzt manzt deleted the manzt/use-jupyter-path branch March 21, 2025 19:42
@ATL2001
Copy link
Contributor

ATL2001 commented Mar 22, 2025

AWESOME!!! you did it! thank you! I've got a button 😊!!! (and I verified that quak is also working as expected from #61 (I'll go close that!))

I'm excited to show this to some people at work! is it Monday yet!?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

widgets not displaying properly when using juv on windows
2 participants