Skip to content

Improve installation page #2538

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

Merged
merged 7 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 24 additions & 14 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
Installation
============

Zarr depends on NumPy. It is generally best to `install NumPy
<https://numpy.org/doc/stable/user/install.html>`_ first using whatever method is most
appropriate for your operating system and Python distribution. Other dependencies should be
installed automatically if using one of the installation methods below.
pip
---

Note: Zarr has endorsed `Scientific-Python SPEC 0 <https://scientific-python.org/specs/spec-0000/>`_ and now follows the version support window as outlined below:
.. code-block:: console

- Python: 36 months after initial release
- Core package dependencies (e.g. NumPy): 24 months after initial release
$ pip install zarr

Install Zarr from PyPI::
There are a number of optional dependency groups you can install for extra functionality.
These can be installed using ``pip install "zarr[<extra>]"``, e.g. ``pip install "zarr[gpu]"``

$ pip install zarr
- ``gpu``: support for GPUs
- ``fsspec``: support for reading/writing to remote data stores
- ``tree``: support for pretty printing of directory trees

Alternatively, install Zarr via conda::
conda
-----

.. code-block:: console

$ conda install -c conda-forge zarr

To install the latest development version of Zarr, you can use pip with the
latest GitHub main::
Conda does not support optional dependencies, so you will have to manually install any packages
needed to enable extra functionality.

Dependency support
------------------
Zarr has endorsed `Scientific-Python SPEC 0 <https://scientific-python.org/specs/spec-0000/>`_ and now follows the version support window as outlined below:

$ pip install git+https://github.com/zarr-developers/zarr-python.git
- Python: 36 months after initial release
- Core package dependencies (e.g. NumPy): 24 months after initial release

To work with Zarr source code in development, see `Contributing <contributing.html>`_.
Development
-----------
To install the latest development version of Zarr, see `the contributing guide <contributing.html>`_.
13 changes: 7 additions & 6 deletions src/zarr/core/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -1847,8 +1847,8 @@ def __repr__(self) -> str:
async def update_attributes_async(self, new_attributes: dict[str, Any]) -> Group:
"""Update the attributes of this group.

Example
-------
Examples
--------
>>> import zarr
>>> group = zarr.group()
>>> await group.update_attributes_async({"foo": "bar"})
Expand Down Expand Up @@ -1947,8 +1947,9 @@ def synchronizer(self) -> None:

def update_attributes(self, new_attributes: dict[str, Any]) -> Group:
"""Update the attributes of this group.
Example
-------

Examples
--------
>>> import zarr
>>> group = zarr.group()
>>> group.update_attributes({"foo": "bar"})
Expand Down Expand Up @@ -2027,8 +2028,8 @@ def __contains__(self, member: str) -> bool:
def groups(self) -> Generator[tuple[str, Group], None]:
"""Return the sub-groups of this group as a generator of (name, group) pairs.

Example
-------
Examples
--------
>>> import zarr
>>> group = zarr.group()
>>> group.create_group("subgroup")
Expand Down
Loading