You can install a basic version of Haystack's latest release by using pip.
pip install farm-haystack
This command will install everything needed for basic Pipelines that use an Elasticsearch Document Store.
If you plan to be using more advanced features like certain DocumentStores, FileConverters, OCR or Ray, you will need to install further dependencies. The following command will install the latest version of Haystack from the main branch and all its dependencies.
pip install --upgrade pip pip install 'farm-haystack[all]' ## or 'all-gpu' for the GPU-enabled dependencies
If you want to avoid a full installation, but still need some extra dependencies you can pick dedicated dependency groups for your installation. To do so, specify them in the
pip install command.
pip install 'farm-haystack[DEPENDENCY_OPTION]'
You can find a full list of dependency options at
[haystack/pyproject.toml](https://github.com/deepset-ai/haystack/blob/main/pyproject.toml#L96). Some common options are:
|Install Haystack and all optional dependencies including developer tools.|
|Install Haystack and all optional dependencies including developer tools with GPU support.|
|Install Haystack and all DocumentStores.|
|Install Haystack and all DocumentStores with GPU support.|
|Install Haystack and FAISS support for the FAISSDocumentStore.|
|Install Haystack and FAISS support for the FAISSDocumentStore with GPU.|
|Install Haystack and all preprocessing tools such as PDF parsing and OCR.|
|Install Haystack and all OCR tools.|
|Install Haystack and all web crawling tools.|
|Install Haystack and Ray support for the RayPipeline.|
|Install Haystack and all development tools needed by contributors.|
|Install Haystack and all dependencies needed to run the full test suite locally.|
|Install Haystack and all dependencies need to run Haystack in Google Colab.|
If you are running
pip<21.3 you won't be able to install dependency groups that reference other groups. Instead you can only specify groups that contain direct package references.
# instead of [all] pip install farm-haystack[sql,only-faiss,only-milvus1,weaviate,graphdb,crawler,preprocessing,ocr,onnx,ray,dev] # instead of [all-gpu] pip install farm-haystack[sql,only-faiss-gpu,only-milvus1,weaviate,graphdb,crawler,preprocessing,ocr,onnx-gpu,ray,dev]
Haystack comes packaged with a REST API so that it can be deployed as a service. There is also a UI that interacts with this service to provide an interactive app to the user. To install these, run the following from the root directory of the Haystack repo.
pip install rest_api/ pip install ui/
We highly recommend installing WSL if you would like to use Haystack on Windows.
pip install farm-haystack -f https://download.pytorch.org/whl/torch_stable.html
Macs with a M1 processor require some extra dependencies in order to install Haystack.
# some additional dependencies needed on m1 mac brew install postgresql brew install cmake brew install rust # haystack installation GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true pip install farm-haystack
Updated 10 days ago