PyPI is the latest version.

Make sure you have Python 3.7+ and numpy installed on Linux/Mac/Windows:

pip install docarray

No extra dependency will be installed.

conda install -c conda-forge docarray

No extra dependency will be installed.

pip install "docarray[common]"

The following dependencies will be installed to enable the most common features:


Used in


advanced serialization


compression in seralization


push/pull to Jina Cloud


visualizing image sprites


image data-related IO


used in embedding projector of DocumentArray


used in embedding projector of DocumentArray

pip install "docarray[full]"

In addition to common, the following dependencies will be installed to enable full features:


Used in


for sparse embedding, tensors


for video processing and IO


for 3D mesh processing and IO


for GraphQL support

Alternatively, you can first do basic installation and then install missing dependencies on-demand.

pip install "docarray[full,test]"

This will install all requirements for reproducing tests on your local dev environment.

>>> import docarray
>>> docarray.__version__
>>> from docarray import Document, DocumentArray

On Apple Silicon#

If you own a MacOS device with an Apple Silicon M1/M2 chip, you can run DocArray natively on it (instead of running under Rosetta) and enjoy much better performance. This section summarizes how to install DocArray on Apple Silicon device.

Check terminal and device#

To make sure you are using the right terminal, run

uname -m

and it should return


Install Homebrew#

brew is a package manager for macOS. If you already install it you need to confirm it is actually installed for Apple Silicon not for Rosetta. To check that, run

which brew

If you find it is installed under /usr/local/ instead of /opt/homebrew/, it means your brew is installed for Rosetta not for Apple Silicon. You need to reinstall it. Here is an article on how to do it.


Reinstalling brew can be a destructive operation. Please make sure you have backed up your data before proceeding.

To (re)install brew, run

/bin/bash -c "$(curl -fsSL"

You may want to observe the output to check if it contains /opt/homebrew to make sure you are installing for Apple Silicon.

Install Python#

Python has to be installed natively for Apple Silicon as well. It is possible it is installed for Rosetta, and you are not aware of that. To confirm, run

import platform


which should give


If not, then you are using Python under Rosetta, and you need to install Python for Apple Silicon with brew.

brew install python3

As of Aug 2022, this will install Python 3.10 natively for Apple Silicon.

Make sure to note down where python and pip are installed to. In this example, they are installed to /opt/homebrew/bin/python3 and /opt/homebrew/opt/python@3.10/libexec/bin/pip respectively.

Install dependencies wheels#

There are some core dependencies that DocArray needs to run, whose wheels are not available on PyPI but fortunately are available on wheel. To install them, run

brew install protobuf numpy

Install DocArray#

Now we can install Jina via pip. Note you need to use the right one:

/opt/homebrew/opt/[email protected]/libexec/bin/pip install docarray

Congratulations! You have successfully installed Jina on Apple Silicon.


To install MPS-enabled PyTorch, run

/opt/homebrew/opt/[email protected]/libexec/bin/pip install -U --pre torch torchvision torchaudio --extra-index-url