Learn practical skills, build real-world projects, and advance your career

Local Development with Python, Conda, VS Code and Git

This tutorial is a part of the Zero to Data Analyst Bootcamp by Jovian

alt

Cloud-based Jupyter notebooks are fast becoming an easy & popular way to write and execute Python code for data science and machine learning. However, it is also possible to run Jupyter notebooks locally on your computer. Moreover, Python can also be used outside of Jupyter, in simple text files called Python scripts. Python projects are organized into modules, and stored in a version control system like Git. In this we'll cover some tools and techniques for local development with Python.

This tutorial covers the following topics:

  • Introduction to the Linux/UNIX terminal
  • Managing Python environments with Conda
  • Creating and editing Python scripts using VS Code
  • Executing Python scripts with command line arguments
  • Organizing Python projects into modules
  • Version control with Git and GitHub
  • Running Jupyter notebooks locally

Introduction to the Linux/Unix Terminal

Developers often use a terminal for installing packages and executing programs on their computer. A terminal offers a command line interface i.e. instead of clicking on buttons to perform actions, you type commands that tell the computer what to do. The execution result of a command (if any) is displayed as text within the terminal itself.

Launching the Terminal

All popular operating systems offer a terminal. The words terminal", "command line", "command line interface", and "console" are often used to refer to the same thing, and can be used interchangeably.

macOS

To launch the Terminal on macOS, open Spotlight (Cmd+Space) and search for the "Terminal" application.

alt

Developers often prefer using iTerm2, an enhanced replacement for the terminal.

Linux (Ubuntu)

On Ubuntu (a popular distribution of Linux), you can use the shortcut Ctrl+Alt+T or launch "Teminal" from the Ubuntu dash.

alt
Windows (WSL2)

On Windows, we strongly recommend using the Windows Subsystem for Linux 2 (WSL2), Ubuntu for Windows and the Windows Terminal. It offers a way of using Ubuntu inside Windows. Install WSL2 by following these instructions: https://youtu.be/A0eqZujVfYU .

You can launch the Windows Terminal application and open a new tab by selecting "Ubuntu" from the dropdown.

alt

NOTE: Do not use Command Line or Power Shell. The commands listed below work only on Ubuntu for Windows.

import jovian