-
Notifications
You must be signed in to change notification settings - Fork 863
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
uv fails to install jupyter_contrib_nbextensions==0.7.0
while pip succeeds
#8884
Comments
I'm a Windows user and I couldn't reproduce the problem you mentioned. |
@leodevian |
Thanks for your quick feedback! Indeed, I did mispell the package name in the description (now edited). The following command should reproduce the issue: mkdir issue
cd issue
uv venv -p 3.11 *> log.txt
uv pip install jupyter_contrib_nbextensions==0.7.0 -vvv *>> log.txt I'm using cpython-3.11.10-windows-x86_64-none, which has been installed using uv. Here are the logs with |
@leodevian Could you provide the Edit: |
@FishAlchemist I don't have I tried the following commands and it still failed with the same error: mkdir issue
cd issue
uv init -p 3.11
uv add jupyter_contrib_nbextensions==0.7.0 It seems that pip succeeds to build a wheel while uv fails? EDIT: I don't understand the difference in behavior. Does pip support deprecated methods that have not been implemented in uv? |
Are you perhaps hitting the filename length limit on Windows? |
The directory is located in I will try to reproduce the issue on my personal computer later, to investigate further. |
It seems possible, as my computer enable Long Paths. To check if it's enabled, you can simply open PowerShell to query. Reading the registry doesn't require administrative privileges.
|
Yes but the error you shared is for |
I don't have it and I have no admin rights on this computer. I will give your more information once I tried to reproduce the issue on my personal computer (with admin rights). Could it be that building universal wheels is not supported by uv? To me, it seems that this feature has been deprecated for quite some time... From the logs:
|
@charliermarsh Yes, I just closed the long path, and then the problem occurred Edit: @leodevian This is the configuration method provided by Microsoft. |
@FishAlchemist Thanks a lot! I guess that's good news. It pains me because I'm promoting uv within my organization and no one will be able to disable the maximum file path limitation because of internal policies... |
Is it possible to bypass the limitation using Here is how I would do it using Python. import os
longpath = "..."
longpath = os.path.realpath(longpath)
unc = "\\\\?\\" if len(longpath) >= 260 else ""
os.mkdir(unc + longpath)
with open(unc + os.path.join(longpath, "hello.txt"), "w") as f:
f.write("Hello world!") |
I don't believe so. Using those UNC paths breaks a lot of things -- for example, any relative paths in the build will be interpreted relative to the drive: #1277 |
Well, I had mitigated hopes on this... I hope that I won't encounter this issue too many times. Meanwhile, I'll look for a workaround. Is it possible to install a package using pip and still manage it using uv (so it won't be uninstalled with |
I'll look into reducing the length of the cache path. |
I actually don't really understand why this succeeds with pip but not uv. Their build cache prefix isn't any shorter, and even when I set |
@charliermarsh I've tracked program's behavior, and it should serve as a reference. UV (uv 0.4.30 (61ed2a2 2024-11-04))( maximum 233 without user home path)
PIP (pip 24.3.1)(maximum 209 without user home path)
|
Collecting clues: With
With
With
I can also |
@konstin -- You may need to use |
Oh my guess is the problem is this huge prefix? |
So sketching this out... When we go to install that wheel:
|
I think one thing we should definitely change is that we shouldn't build the wheel into |
We may also want to consider shortening |
Okay cool, I just got this package to build on my machine. It'll be a series of small PRs. |
## Summary See: #8884. We build in a directory that's deep within the cache; to help with file name length limits, we should build at the top-level of the cache.
## Summary In the example outlined in #8884, this removes an unnecessary `jupyter_contrib_nbextensions-0.7.0.tar.gz` segment (replacing it with `src`), thereby saving 39 characters and getting that build working on my Windows machine. This should _not_ require a version bump because we already have logic in place to "heal" partial cache entries that lack an unzipped distribution. Closes #8884. Closes #7376.
Hello,
I'm using uv 0.4.30 (61ed2a2 2024-11-04) on Windows and I'm trying to install
jupyter_contrib_nbextensions==0.7.0
. It seems that uv fails to install the package as it cannot be built with the latest versions ofsetuptools
, due to some deprecations.However, the latest version of pip (24.3.1) succeeds to build and install the package and I would like to understand this difference in behavior.
I read the documentation on build failures and I don't understand if I can force a version of
setuptools
andwheel
forjupyter_contrib_nbextensions
.Also, can I manage this package with uv if it has been installed using pip?
Thank you for your awesome work!
The text was updated successfully, but these errors were encountered: