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

uvx (and uv) considerably slower in windows command prompt but fine in powershell #7025

Closed
geophpherie opened this issue Sep 4, 2024 · 7 comments
Labels
windows Specific to the Windows platform

Comments

@geophpherie
Copy link

Running uvx jupyter in windows command prompt really chokes up for me, the progress bars start freezing up and progress becomes unclear. But in powershell everything runs with reasonable speed. This is using 0.4.4.

I settled on this as a MRE, but I first came across this when using uv run with a script that launches jupyter. Was seeing terrible performance in command prompt, but fine in powershell, and fine on a mac on the same wifi.

This snippet was my ultimate goal, to be run with uv run.

# /// script
# requires-python = ">=3.12"
# dependencies = [
#     "jupyter",
#     "pandas",
# ]
# ///
import subprocess
from pathlib import Path

subprocess.run([
    "jupyter",
    "notebook",
])

Originally came to the GitHub issues through (#5073) but I think maybe it's not quite similar enough. Any thoughts or tips would be much appreciated!

export

@zanieb
Copy link
Member

zanieb commented Sep 4, 2024

Can you try using --no-progress? Maybe it's a rendering issue.

@geophpherie
Copy link
Author

Thanks for the quick response!

Running uvx --no-progress jupyter seems to result in the same thing.

In CMD it takes a long time, haven't got it to complete yet, but in PS it finishes up quick. So maybe same issue still there?

Installed 96 packages in 1.90s

@geophpherie
Copy link
Author

So it ends up as a network timeout - but again, in PS and on MAC on same wifi there's no issue with timing out. Idk that babel itself is a problem or just caught in the crossfire here.

error: Failed to prepare distributions
  Caused by: Failed to fetch wheel: babel==2.16.0
  Caused by: Failed to extract archive
  Caused by: Failed to download distribution due to network timeout. Try increasing UV_HTTP_TIMEOUT (current value: 30s).

@zanieb
Copy link
Member

zanieb commented Sep 4, 2024

Very weird — sorry I have no idea why Windows behavior would be different across these two shells.

@zanieb zanieb added the windows Specific to the Windows platform label Sep 4, 2024
@geophpherie
Copy link
Author

Well so if i launch cmd.exe in powershell it works as expected ... idk what's going on there but doesn't seem like a uv problem that I can tell. Gonna close this.

thank you for the time!

@geophpherie
Copy link
Author

FWIW I've now learned that running uvx --no-cache jupyter notebook makes it run just as snappy in CMD as in PS.

@geophpherie
Copy link
Author

Sort of wondering if there's something that's slowing down cache lookups for some reason. Some of these take up to 10s - i'm guessing it shouldn't take near that long.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Specific to the Windows platform
Projects
None yet
Development

No branches or pull requests

2 participants