Skip to content

Files

Latest commit

 

History

History

Introduction to Python

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Python Tutorial

We recommend you to work with Jupyter Notebooks as most of the assignments will be provided in Jupyter Notebooks. Also it recommended to work online using Google Colab, so that you already have access to most of the python packages (i.e. no need to install them). If you want to work offline you can but support provided will be less (you need to google yourself) as if we go on solving package issues for everyone it will become very very difficult to complete the workshop on time.

Starting the python tutorial

Using Google Colab to run jupyter Notebooks (Recommended)

Setup your environment to work locally on Python (Not Recommended)

I recommend using the Anaconda distribution to use python on your machine. Kindly follow the below steps to setup your machine:

Install Anaconda: Kindly follow the steps given at the link: for windows here and for linux here. Make sure to install the Anaconda for python version 3.7

Create a Virtual Environment: I strongly suggests you to always work with using different environment setups for your different projects to manage their individual dependencies. So, create a separate environment for this workshop and other works related to BCS Workshop'.

Creating Anaconda Virtual environment

  • Open terminal in linux or Anaconda CMD in windows and run conda create --name bcs_iitk python=3.7 anaconda to create a virtual environment with name bcs_iitk
  • To work inside this environment activate it before executing any python program, run conda activate bcs_iitk
  • Once, you are done with your work exit the environment by running conda deactivate

Running Jupyter Notebooks (local)

  • Make a new directory mkdir bcs_iitk_workshop
  • Change your directory cd bcs_iitk_workshop
  • Run jupyter notebook in terminal (linux) or Anaconda CMD (windows)
  • This will open a link in your browser where you will work with the jupyter notebooks.