Browse all docs

Python Environment

Code status: The code on this page was corrected on 17 September 2026 against the current Earth Engine Data Catalog and API documentation. It has not been executed against Earth Engine. No signed-in Earth Engine project was available for this review, so runtime values, map layers, exports, and screenshots could not be checked. Screenshots, printed values and described outputs come from earlier versions of this lesson and may differ from what the corrected code produces.

Python geospatial packages can conflict, so keep each local project in its own environment. For a one-off lesson, Google Colab avoids local installation; for repeatable work, a local environment keeps the package setup under your control.

This course was developed on a Mac with Visual Studio Code and Anaconda, but you do not need to reproduce that setup exactly. Pick one of the two small setups below and add packages only when a lesson needs them.

Choose one environment

For a short lesson: use Google Colab to open a notebook in your browser. It avoids local installation, but notebook sessions and files are tied to your Google account, and Earth Engine may ask you to authenticate again in a later session.

For repeatable local work: install Python 3, create one isolated environment with either Python’s built-in venv and pip or Conda/Mamba, and use one editor or notebook interface such as Visual Studio Code with Jupyter support.

For the Earth Engine lessons in either environment, the only packages used here are earthengine-api and geemap. Follow Getting Started with GEE for installation, authentication, and initialization.

Do not combine multiple environment managers in the same environment. If a later workflow needs additional geospatial libraries, add them to that environment then; a large all-in-one package bundle is not required for the introductory Earth Engine lessons.