Skip to content

How to setup the Development Environment for the project

Sunayana Ghosh edited this page Oct 3, 2022 · 1 revision

Setup pyenv (for installing different versions of Python)

  • Follow the instructions here to install pyenv for MacOS from here
  • How pyenv works : Gives an understanding of why to use pyenv.

Setup poetry development environment for the project

  • Follow this instructions to install poetry from here
  • Check the version of poetry installed by using poetry --version. Verify that it is 1.2

Virtual Environment setup

  • Install the latest version of python using pyenv : pyenv install 3.10.2

  • Set the local version of this repository (energy harvest trust code) using pyenv (to use python 3.10.2): pyenv local 3.10.2

  • Check the version is correct:

 $ pyenv versions
  system
* 3.10.2 (set by /home/sghosh/dev/dssg/code/energy_harvest_trust/.python-version)

Note the start next to 3.10.2 denotes the right path.

  • Then to setup the poetry virtual environment for the project do:
poetry shell

If everything goes well you should see: image

  • Check the gdal version installed :

    • gdal-config --version : If it is not 3.4.1 do the following:
  • To install the virtual environment now just do : poetry install

  • To learn more about managing environments with poetry and pyenv : Managing Environments

Working with Git