-
Install Rust compiler
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install protobuf compiler
# Linux sudo apt-get install protobuf-compiler # mac OS brew install protobuf
Or alternatively install from source: https://github.com/protocolbuffers/protobuf/releases/tag/v22.2
Note: If you are still getting an error like
Could not find protoc installation
- set thePROTOC
environment variable to theprotoc
binary you just installed.export PROTOC=/path/to/protoc
-
Install lib-ssl
If you are getting an error like
Could not find directory of OpenSSL installation
, you need to install lib-ssl.sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev
brew install openssl
-
Generate OpenAPI client (Optional, usually done automatically at build time)
Pinecone uses an OpenAPI spec for control-plane operations like
create_index()
. The OpenAPI client is automatically generated using openapi-generator during project build. This process uses Docker todocker run
OpenAPI's generator image.
If you don't have docker installed, or you don't want to use docker - you can download the generated code from the latest release. Simply extract theindex_service.zip
file into theindex_service/
folder at the root of the project.
# Create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate
# Install as editable package
cd pinecone
pip install -e .
# optionallly, install test dependencies and run tests:
pip install -e .[test]
pytest ../tests/unit
# Create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate
# Install maturin
pip install maturin
# Install pinecone package for development
cd pinecone
maturin develop
cd pinecone
maturin build --release
cargo build
TBD