Skip to main content
Version: 0.39.0

Virtual Environment Setup

Prerequisites

  1. Python 3.7 or later

Clone Git Repos

You will need to clone the following repos:

  1. zepben/evolve-sdk-python
  2. zepben/evolve-grpc
  git clone https://github.com/zepben/evolve-sdk-python.git
git clone https://github.com/zepben/evolve-grpc.git

Setup Virtual Environment

Once you have both repos create a virtual environment that will be shared between them. This will allow you use the your local version of the evolve-grpc as a dependency for the evolve-sdk-python instead of having to rely on the changes for the evolve-grpc to be finalised and deployed.

evolve-grpc

  1. Move to the evolve-grpc python directory and run the 'venv' python command to generate a virtual environment. This command will create a directory called .venv where all the files related to the virtual environment will be stored. Remember this directory as we will need it in the future whenever we want to reference this virtual environment.
  cd evolve-grpc/python/
python -m venv ../../.venv
  1. Activate the virtual environment you just created.
source ../../.venv/bin/activate

  1. Install all packages required to build the evolve-grpc repo.
python -m pip install -r requirements.txt

  1. Run the build.py script in evolve-grpc.
python build.py

  1. Install the project in editable mode (this will allow you to use the evolve-grpc package locally)
python -m pip install -e .

evolve-sdk-python

  1. Move to the evolve-sdk-python root directory. (Make sure you are still using the same virtual environment)
cd ../../evolve-sdk-python/

  1. Install the project in editable mode. This will be useful if we need to use the sdk in the future as a depencency. Note that for this command we also specify we require the test related packages.
python -m pip install -e .[test]

  1. At this point you should have the virtual environment ready for both repos with all the required packages installed and the zepben.protobuf and zepben.evolve packages installed locally in editable mode. You can confirm this by running the following command:
python -m pip list