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

Pipenv fail installation - Add documentation #822

Closed
AlmogCohen opened this issue May 4, 2019 · 20 comments
Closed

Pipenv fail installation - Add documentation #822

AlmogCohen opened this issue May 4, 2019 · 20 comments
Labels
C: packaging Installation and packaging of Black

Comments

@AlmogCohen
Copy link

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 #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.

@JelleZijlstra JelleZijlstra added the C: packaging Installation and packaging of Black label May 5, 2019
@max-wittig
Copy link

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

@JelleZijlstra
Copy link
Collaborator

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

@AlmogCohen
Copy link
Author

AlmogCohen commented May 6, 2019 via email

@rpdelaney
Copy link

Any update on that 1.0.0? 😄

@max-wittig
Copy link

@rpdelaney See this issue: #517

@mcauto
Copy link

mcauto commented May 27, 2020

Do you have an update plan about this issue?

my solution

$ pipenv install --dev black==19.3b0

@SanketDG
Copy link
Contributor

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.

@ichard26
Copy link
Collaborator

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 🤣

@delwaterman
Copy link

This is still an issue

@hectormirete
Copy link

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

vipranarayan14 added a commit to vipranarayan14/sanscript-cli that referenced this issue May 9, 2021
How?
Enable `allow_prereleases` in Pipfile.

Why?
After installing dependencies, locking fails due to 'black' pkg's
prerelease version. 'black' has not released a stable version yet.
Ref:
- psf/black#517
- psf/black#822
@ggabriel96
Copy link

ggabriel96 commented Jun 2, 2021

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 pypa/pipenv#1760.

IMO this comment above is currently the best solution: #822 (comment)

@praveen868686
Copy link

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

@ambv
Copy link
Collaborator

ambv commented Sep 26, 2021

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.

@praveen868686
Copy link

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

@shamique202
Copy link

pipenv install --dev black==19.3b0

@frob
Copy link

frob commented Oct 11, 2022

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

@JelleZijlstra
Copy link
Collaborator

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.

@AlmogCohen
Copy link
Author

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

@JelleZijlstra
Copy link
Collaborator

The first stable release was in January actually :)

@AlmogCohen
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: packaging Installation and packaging of Black
Projects
None yet
Development

No branches or pull requests