-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Black install via pip fails on embedded Python on Windows using latest pip version (20.3) #1847
Comments
/me boots Windows VM to debug tonight or some time soon hopefully |
Just as an additional piece of information: the install works when when you tell pip to use it's legacy resolver which isn't as strict about metadata (see below). However, you can see that it is definitely confused about versions - it states
Note: the legacy resolver will be going away in the next pip release (Jan 2021 apparently), so it isn't a long-term solution. |
Yup sure thing. I'll fix and push for a release before then. Thanks for raising. |
I'll also look into this soon. I think this has something to do with |
I imagine a partial solution would be to publish a wheel for the latest version - installing the latest version that had a wheel (19.x) worked fine for me. Obviously it'd be good to work out why it's actually happening too though! |
We want to do more releases more often so I'm totally +1 for a new release. Need to check that the CHANGELOG is ready though. One thing, I can't do a release. I clearly have some power to push for a release, but no power to create and push one. That power lies with the other collaborators :-) @cooperlees, what do you think? |
Since @cooperlees asked nicely... You seem to be hitting pypa/setuptools-scm#386. The main solution is listed in pypa/setuptools-scm#386 (comment). I'm not a 100% sure how you're generating release artifacts, (I don't see your release process documented -- it's usually a good idea to do so, to avoid mistakes!) but it does seem that the sdist doesn't have the metadata that setuptools_scm needs to properly version it, likely due to setuptools_scm not being installed/used in the build environment. Also, even though this is a pure-Python project, I strongly recommend uploading wheels to PyPI. Most users who use pip won't really download/uses the sdist if there's a wheel, so you'd also buy some time to investigate the underlying issue here by uploading a well-formed wheel. I'll leave it up to the maintainers to decide whether they want the 20.8 beta wheel built (checkout the 20.8 tag and build the wheel with |
at first glance i believe a part of the problem is that |
FWIW, I just ran into this issue on an AWS EMR cluster linux install as well. Pinning pip to 20.2.4 worked around the issue for me |
Was able to get around this with all of my other packages by switching from their src dist to their binary. This was the only package that had the issue, and did not have a binary. |
@cooperlees We're getting fairly close to the time that the legacy resolver in pip will be going away (the last information I could find said Jan 2021). Has there been any progress on fixing this? From what I can see from the discussion above, uploading a wheel would probably fix it for the moment, giving more time for a more general fix involving setuptools-scm. If there's anything I can do to help get this done soon then just let me know |
FWIW, https://pypi.org/project/black/#data tells me that there's quite a few folks who can make the release. It might be worth reaching out to them as well. |
I'm seeing a similar issue when pip-installing
The issue has been occurring across our CI clusters for a month now, since mid-January. I don't think this issue is limited to Windows. |
For folks looking to workaround this issue, downgrading has fixed the install issues in CI for our company:
|
This is no longer a working solution. Our build server went belly up. Could we get a binary release of black? That is how I am resolving for all my other packages... |
Pinging a few other people listed as maintainers on the PyPI page, in case they can help get a wheel release out, while we wait for a full fix. It seems that this is failing on multiple platforms, and causing issues for CI for a lot of people, and (I hope) should be a fairly simple fix to upload a binary wheel release. Is there anything you can do to help get a new release out as soon as possible: @ambv, @autophagy @carljm @willingc ? |
I'd love to. I just don't have access. I've been personally trying to nudge @ambv ... Gonna be a rocky release tho. We have almost ~8 months of merges so people will need to be ready for that. |
@cooperlees I do have PyPI access, let's talk with the other maintainers to see if we can get a release out. |
De-assigning myself since I do not have enough time to debug (also debugging is annoying since I dual boot Ubuntu and Windows but I only daily drive Ubuntu). Hopefully GH-2125 happens soon so this is resolved (or I guess worked around?). |
FWIW, I just saw that this involves using an embedded interpreter. Using pip with an embedded Python interpreter is explicitly not supported, by Python or pip. From the link in OP:
I'd suggest closing this issue, since the specific usecase being asked for is not supported by the tooling being used. |
Agree. The pip king has spoken. |
Describe the bug
A new version of pip has recently been released, which is a lot stricter in many ways. When installing the latest version of Black on a Windows machine using the embedded Python distribution, I get an error:
The package it is trying to download is the latest source release (20.8b1), and from what I can gather, pip finds that the version in the filename (20.8b1) conflicts with the version in the metadata inside the package - which it says is 0.0.0.
To Reproduce
python.exe -m pip install black --no-cache-dir
If the latest version which has a wheel release published to PyPI is specified instead, then it works fine:
So, it seems to be something to do with the metadata checking before building the wheel which is going wrong.
The latest version of Black worked fine with the previous version of pip which didn't use the new strict metadata checker.
I can't seem to reproduce this in non-embedded Python, but it may be an issue there too. I'm aware that pip isn't officially supported for embedded Python on Windows, but it is widely used and all other packages seem to install fine:
Expected behavior
Expected to install successfully.
Environment (please complete the following information):
Does this bug also happen on master?
N/A as related to PyPI releases
The text was updated successfully, but these errors were encountered: