0% found this document useful (0 votes)
10 views

2. Python Programming Development Environment Set-up

The document outlines the essential steps for setting up a Python programming environment, including installing Python, using interactive shells like IPython, and utilizing IDEs such as VS Code and Anaconda. It also discusses alternatives like MiniConda and cloud-based options like Google Colab for running Jupyter notebooks. Additionally, it emphasizes the importance of organizing training materials and provides a suggested folder structure for effective management.

Uploaded by

eltorhema
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

2. Python Programming Development Environment Set-up

The document outlines the essential steps for setting up a Python programming environment, including installing Python, using interactive shells like IPython, and utilizing IDEs such as VS Code and Anaconda. It also discusses alternatives like MiniConda and cloud-based options like Google Colab for running Jupyter notebooks. Additionally, it emphasizes the importance of organizing training materials and provides a suggested folder structure for effective management.

Uploaded by

eltorhema
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Python programming development

environment set-up
Setting Up Your Python Programming Environment

A proper Python
environment provides
Choosing the Right Tools
the necessary tools to
for Your Coding Journey
write, run, and manage
Python code.

It helps to avoid
It includes Python itself,
common conflicts and
along with helpful tools
issues when using
and libraries.
Python.
Installing Python (The Core)
• Python is the core programming language you will be
working with.
• version of Python (latest) is needed.
• there are different ways to get it (through distribution,
or direct download).
• Python alone may not be enough
Interactive Python (IPython)

IPython is an
It allows you to run
enhanced
Python code line by
interactive shell for
line and see results
Python (a command-
immediately.
line interface).

It is useful for quick


testing and It is a good way to
experimentation get started.
with code.
Command Line (Terminal)

• The command line (also called terminal) is a text-based interface for


interacting with your operating system.
• It's used to run Python scripts, install packages, navigate files, and much
more.
• It is very useful to learn, even if you use other software.
• It is a common way to run code when not using an IDE (Integrated
Development Environment).
• Some commands you can use are:
• cd (change directory), mkdir (make directory), python (run python code).
VS Code (Visual Studio Code) is a popular,
free, and versatile IDE for writing, running,
and debugging code.
Integrated It has many features, such as code
Development completion, syntax highlighting, and a built-in
terminal.

Environments It can be used with different programming


(IDEs): VS languages.

Code Many extensions and plugins can be added to


it, to fit specific needs.

It can be used on Windows, macOS, and Linux.


Anaconda: A Comprehensive Distribution

It includes Python itself, a


package manager
Anaconda is a free, open-
(conda), and many
source distribution of
popular data science
Python.
libraries (Pandas, NumPy,
Matplotlib, etc.).

It is very useful for those It simplifies the process


working in data science of setting up your
or machine learning. environment.
MiniConda: A Lightweight
Alternative
• MiniConda is a minimal installer for conda, which manages
packages.
• It includes python, but does not include all the data science
packages that Anaconda includes.
• It is smaller in size and more lightweight than Anaconda.
• It is useful for those who want more control over their
installation, and do not need all the extra features that come
with Anaconda.
Jupyter Notebook/Lab: Interactive
Computing
Jupyter Notebook and Jupyter Lab are web-based interactive environments for
writing, running, and sharing code.

They allow a mix of code, text, visualizations, and notes in one document.

They can easily be shared with others.

They are great for data exploration, analysis, and learning.

Jupyter lab is the next generation of jupyter notebooks.


Google Colab: Cloud-Based
Computing

• Google Colab is a free cloud service for running Jupyter


notebooks.
• You can run your code in the cloud using a free online
notebook.
• It does not require installing anything on your computer.
• It has limited time and resources for running code, and will be
cut off when exceeding it.
• It is very useful for testing or coding small scripts.
For beginners: Anaconda (easiest setup and useful in the
future)

Choosing
Main environment for this training

For more control: MiniConda (then install specific

the Right packages you need)

Environm For coding and debugging: VS Code (powerful and feature


rich)

ent For interactive analysis and sharing: Jupyter


Notebook/Lab (great for data analysis)

We will focus on using Jupyter Notebook, for most


exercises.

If the you want more control of your code, you can use VS
Code.
https://www.python.org/
https://www.anaconda.com/download
https://code.visualstudio.com/
Anaconda

1 2 3 4 5
Go to the official Navigate to the Choose the correct Select the Python 3.x Download the
Anaconda website. download section. installer for your version (preferably graphical installer for
operating system the latest stable your system.
(Windows, macOS, or version).
Linux).
installation
Run the downloaded installer.

Follow the installation wizard.

Use all the default settings.

Ensure you choose "add


Anaconda to Path" option.
If prompted, accept to give
the program admin
privileges.
Installation may take some
time.
Launch Jupyter Notebook

Launch Anaconda Navigator, the main program used to


manage the Anaconda environment.

From Anaconda Navigator, click on "Jupyter Notebook" or


"JupyterLab" to launch the interactive coding environment in
your web browser.

You may have to allow the browser to run the notebook.


Create a New Notebook

Once the web browser has loaded, you should see a screen with
all of your files.

To create a new notebook, select "New", and then choose


"Python 3 (ipykernel)".

This will create a new python document where you can write
and run code.

You can rename the file by clicking on the name at the top of
the page.
Test Your Installation: write your first
program

If the text "Hello,


In the first cell in Click on the play World!" appears
the notebook type button or press below the code,
print("Hello, "shift + enter" to then your
World!") run the code. installation was
successful.
Structuring Your Training Directory
and Folders

Helps keep track of Makes it easier for


Improves collaboration
training materials and participants to find
between trainers.
code. what they need.

Emphasize the
importance of being Makes it easier to
Prevents lost files and
organized, as this skill update, and make
confusion.
will carry forward into changes to the course.
coding as well.
Possible Structure

• All of the training material will be housed under


one folder.
• This folder should have a clear and relevant
name such as "Python_Training_SPHI_RDMC".
• Key Subfolders
• materials: To organize all the presentation
material,
• Source code: exercises, and code examples
• datasets: To store all datasets that will be used
in exercises and demos.
• solutions : To store the code solutions for
trainers to reference.

You might also like