-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[2492] Add new page to document installation methods #3941
Closed
+76
−4
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Ways to install Black | ||
|
||
There are several ways you can install _Black_. If you're looking to integrate _Black_ | ||
with different editors and environments, check the | ||
[Integrations](../integrations/index.md) section instead. | ||
|
||
## Install from PyPI | ||
|
||
To install the latest release of _Black_ from [PyPI](https://pypi.org/project/black/) | ||
(Requires Python {{ SUPPORTED_PYTHON_VERSION }}), use: | ||
|
||
`pip install black` | ||
|
||
_Black_ also publishes a number of extras. These are optional modules, designed to add | ||
functionality to the core _Black_ package. | ||
|
||
| extra | Description | command | | ||
| -------- | ------------------------------------------------------------- | ----------------------------- | | ||
| jupyter | Allows formatting of Jupyter notebooks | `pip install black[jupyter]` | | ||
| d | Run _Black_ as a [server](./black_as_a_server.md) | `pip install black[d]` | | ||
| colorama | Enables colored diffs in Windows environments | `pip install black[colorama]` | | ||
| uvloop | Speeds up _Black_ when concurrently formatting multiple files | `pip install black[uvloop]` | | ||
|
||
A _Black_ release currently offers three types of artifacts via PyPI, as outlined in the | ||
[Release Process](../contributing/release_process.md): | ||
|
||
1. The source distribution of the release | ||
2. Generic Python wheel, meant for use on any Python supported platform | ||
3. Platform and Python version specific wheels that offer significantly improved | ||
performance, compiled using [mypyc](https://mypyc.readthedocs.io/) | ||
|
||
By default, `pip` will prefer a compatible wheel and revert to the source distribution | ||
if no such wheels are found, as outlined in | ||
[Python documentation](https://packaging.python.org/en/latest/tutorials/installing-packages/#source-distributions-vs-wheels). | ||
|
||
## Install from GitHub | ||
|
||
To install the latest commit of _Black_ from the GitHub 'main' branch, use: | ||
|
||
`pip install git+https://github.com/psf/black` | ||
|
||
## Get native binaries from GitHub | ||
|
||
[GitHub Releases](https://github.com/psf/black/releases) for _Black_ contain | ||
self-contained, native binaries for multiple platforms (built using PyInstaller). This | ||
allows you to download the executable for your platform and run _Black_ without a Python | ||
runtime installed. | ||
|
||
## Black Docker images | ||
|
||
Official _Black_ Docker images are available on | ||
[Docker Hub](https://hub.docker.com/r/pyfound/black). For more information on its usage, | ||
check the [Black Docker image](./black_docker_image) section. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O - Just thought of it - Please talk about all black's optional installs in this section too, please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, please check!