Skip to content

Developer Start Guidance

Huimin Liu edited this page Nov 9, 2019 · 14 revisions

macOS:

Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Python 3.6+

  1. Install python version manager pyenv: brew install pyenv

  2. Use pyenv to check latest Python version: pyenv install --list | grep -E ' 3.[67].'

  3. Select one from the list and install the latest Python: pyenv install 3.7.4

    ** technically, you could use any 3.6 + version **

Install gdal:

brew install gdal

The tested version is gdal@2.4.2

Install PostgreSQL:

brew install postgresql

The tested version is postgresql@11.5_1

Then install Python packages:

  • Recommend to use a python virtualenv: pip install virtualenv create a virtual environment called venv: virtualenv venv or python3 -m venv venv then activate venv:source venv/bin/activate

  • Install all requirements: run cat requirements.txt | xargs pip install

  • if run into the error below:
    ld: library not found for -lssl
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'gcc' failed with exit status 1

check this page

Linux (Ubuntu):

We are using Ubuntu as the deployment server. If you are using other linux or unix based system to develop, you are responsible to make sure it works or its dependencies work on Ubuntu

Install Python 3.6+:

sudo apt-get install python3.6

(To see which version of Python 3 you have installed, open a command prompt and run python3 --version)

The tested version is Python 3.6.8

Install gdal:

sudo apt-get install python3-gdal

Install PostgreSQL:

sudo apt-get install postgresql

Then install Python packages:

  1. Make sure you have pop available, you can check this by running:pip3 --version if pip isn't already installed, then running:sudo apt install python3-venv python3-pip

  2. While pip alone is sufficient to install from pre-built binary archives, up to date copies of the setuptools and wheel projects are useful to ensure you can also install from source archives: python -m pip install --upgrade pip setuptools wheel

  3. Recommend to create a virtual environment:python3 -m venv <DIR>.Then activate venv: source <DIR>/bin/activate

  4. Install all requirements: First pip3 freeze > requirements.txt. Then pip3 install -r requirements.txt