black icon indicating copy to clipboard operation
black copied to clipboard

Pipenv fail installation - Add documentation

Open AlmogCohen opened this issue 5 years ago • 15 comments

Operating system: OSX Mohaje latest release Python version: 3.7.2 Pipenv version: 2018.11.26 Black version: Not relevant Does also happen on master: Not relevant, it has to do with PyPi

Seems like a very cool tool! But seems like it is not very friendly for users trying to install it using pipenv. Simply running pipenv install black fails, probably due to what mentioned here https://github.com/python/black/issues/517. As pipenv an the official tool, the first thing people run is pipenv install black and the first thing they see is a weird failure.

You mention pip install black in the documentation, so I recommend simply adding instructions for how to install with pipenv so people don't have to google around until they find the relevant issue.

AlmogCohen avatar May 04 '19 01:05 AlmogCohen

Better solution would be to just release 1.0.0 of black, so that it can be installed normally. What's the status on that? @ambv

max-wittig avatar May 06 '19 07:05 max-wittig

We're hoping to release a stable release in the next few days.

JelleZijlstra avatar May 06 '19 08:05 JelleZijlstra

Awesome work thank you, I enjoy this tool very much! Saves lots of time....

On Mon, May 6, 2019 at 1:08 AM Jelle Zijlstra [email protected] wrote:

We're hoping to release a stable release in the next few days.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/python/black/issues/822#issuecomment-489539952, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5VOZUVEOVV4YVHZFEAVCLPT7RP5ANCNFSM4HKXZWEA .

--

Almog Cohen

https://htmlsig.com/signatures/01ADE8F6/edit

[image: Linkedin] http://linkedin.com/in/almogcohen US: (415) 413-6714

AlmogCohen avatar May 06 '19 14:05 AlmogCohen

Any update on that 1.0.0? 😄

rpdelaney avatar Aug 07 '19 22:08 rpdelaney

@rpdelaney See this issue: https://github.com/psf/black/issues/517

max-wittig avatar Aug 08 '19 06:08 max-wittig

Do you have an update plan about this issue?

my solution

$ pipenv install --dev black==19.3b0

mcauto avatar May 27 '20 23:05 mcauto

How about a general update to the documentation?

Common installation options using poetry, pip, pipenv and pipx and also a note about the pre-commit hook.

SanketDG avatar May 29 '20 19:05 SanketDG

I would be interested in doing a general update of the documentation to make it easier to get started in using Black. The only issue is that my main laptop is out of action, so I am using an old Ubuntu laptop :rofl:

ichard26 avatar May 29 '20 19:05 ichard26

This is still an issue

delwaterman avatar Sep 21 '20 13:09 delwaterman

This happens because pipenv does not look for beta releases and black only has beta releases https://github.com/microsoft/vscode-python/issues/5171 Try it with pipenv install black --pre. If you are installing from your pipfiles try pipenv install --dev --pre

hectormirete avatar Oct 25 '20 12:10 hectormirete

This happens because pipenv does not look for beta releases and black only has beta releases microsoft/vscode-python#5171 Try it with pipenv install black --pre. If you are installing from your pipfiles try pipenv install --dev --pre

This is a problem because that adds an option that allows pre-releases for any dependency. See https://github.com/pypa/pipenv/issues/1760.

IMO this comment above is currently the best solution: https://github.com/psf/black/issues/822#issuecomment-635004328

ggabriel96 avatar Jun 02 '21 17:06 ggabriel96

PS C:\Users\user\Documents\GitHub\my-pytest\api\my_pytest_app> pipenv install --dev --pre black Installing black... WARNING: Expecting property name enclosed in double quotes: line 13 column 50 (char 347) Installation Failed

Not sure how to resolve this , have tried all different commands mentioned above. Can someone help thanks

praveen868686 avatar Sep 26 '21 11:09 praveen868686

Praveen, it's hard to help you without you specifying versions of all things. I suspect you're trying to install Black with Python 2.

ambv avatar Sep 26 '21 11:09 ambv

Hi this is the command I am trying to use and error as below. Python 3.9.6 version pipenv install black --pre Installing black... WARNING: Expecting property name enclosed in double quotes: line 13 column 50 (char 347) Installation Failed

My pip file: [[source]] url = "https://pypi.org/simple" verify_ssl = true name = "pypi"

[packages] pytest = "" djangorestframework = ""

[dev-packages]

[requires] python_version = "3.9"

[pipenv] allow_prereleases = true

thanks

praveen868686 avatar Sep 27 '21 04:09 praveen868686

pipenv install --dev black==19.3b0

shamique202 avatar Jul 21 '22 17:07 shamique202

I see there is a release now. Still cannot install with pipenv unless I set the version like in the above comments.

frob avatar Oct 11 '22 18:10 frob

We have a stable release now, which appears to solve the original problem in this issue. If you're still having problems using Black with pipenv, please open a new issue explaining exactly what is going wrong.

JelleZijlstra avatar Oct 11 '22 18:10 JelleZijlstra

At last! Thank you 🙏😊 Absolutely useful project for the entire community!

AlmogCohen avatar Oct 11 '22 19:10 AlmogCohen

The first stable release was in January actually :)

JelleZijlstra avatar Oct 11 '22 19:10 JelleZijlstra

Oops, didn't notice...Too much Typescript lately 😉

AlmogCohen avatar Oct 12 '22 07:10 AlmogCohen