# Beginner’s Guide to Setting Up Python and Installing Packages

Before diving into machine learning projects, it’s essential to set up a proper development environment. This ensures you have all the tools and libraries that you need which are organised and ready to use. In this section, we’ll walk through how to install Python, the Anaconda distribution, and Jupyter Notebook which a popular tool to write and run Python code interactively.

Let us start by setting up Python. If you are just getting started, I highly recommend using Anaconda as it comes with Python and many ML tools pre-installed. But I will also show you how to install Python manually if you prefer the classic route.

## Installing Python

1. To Download Python [Click Here](https://www.python.org/downloads/)
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749491939958/9861a69a-a9a6-49f3-ab6a-49031d9cea21.png align="center")
    
2. Now once the file is downloaded, at bottom there will be two checkboxes with use admin privileges when installing py.exe and add python.exe to PATH. Select both the options and then above choose CUSTOMISE INSTALLATION. After that click on next.
    
3. A list of features might appear on your screen like Documentation ,pip,py launcher ,etc. Keep them selected as they are and click on next.
    
4. From Advanced Options, Choose Install Python 3.13 for all users , it will also automatically enable two options and keep the rest of the options as they are. Below this you will find the location where your python will be installed.
    
5. Click Install. Your set up will begin.
    
6. Once you finish the installation and it was successful, click on close button.
    

## Verifying Python Installation

1. Open Command Prompt in your device.
    
2. Type command **“python —version”**.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749492284673/d3078bd2-fb2b-4b5d-8a3d-2e28ed180327.png align="center")
    
3. This will give you the installed version of python. If it is not installed properly then it would give an error. To install properly, refer to Installing Python properly.
    

## Let’s write First Program in Python

1. Open Command Prompt in your device.
    
2. Type python
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749492325221/d3bd9fb5-b53b-413e-a314-b153f7d1e903.png align="center")
    
3. This will open the Python interactive shell where you can write and execute Python code instantly.
    

However writing code in terminal is a tedious task, so instead we use a text editor. We can use one of the most popular text editor , **VS Code** of Microsoft which is free for everyone.

## Installing VS Code

1. [Click here](https://code.visualstudio.com/) to download VS Code.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749492362662/b6028452-efbb-4ddb-8d80-11a12bcebb09.png align="center")
    
2. Click on Download for Windows and select the appropriate version. If the download started automatically means your version has already been selected. After selecting the version the download will automatically start.
    
3. If you are on MAC or Linux you can choose your device and versions appropriately and then download the file.
    
4. Once downloaded, click on that file to begin the installation
    
5. You will get a box , at the bottom you can see two checkboxes. Click on I Accept the agreement and click on next.
    
6. It will give you the path where VS Code will be installed. Click on Next.
    
7. Click Next
    
8. Here dont forget to mark the checkbox of Create a Desktop Icon. This will create a desktop icon for you which will be very useful. Click Next.
    
9. Click Install
    
10. After Installing Click Finish. You have successfully installed VS Code.
    

## Installing Anaconda ( Recommended for beginners)

If you are new to Python or working on data science and machine learning projects, **Anaconda** is your best friend. It comes with Python, Jupyter Notebook, and many useful libraries like NumPy, pandas, Matplotlib, and more, so that you do not have to install them separately.

1. [Click here](https://www.anaconda.com/download/success) to download Anaconda Distributor.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749492378435/51b4342a-aa57-40f2-9b26-3d35c0672d77.png align="center")
    
2. In case it asks you for email for registration in order to download, then at bottom you can skip. Don’t worry , I have shared with you the direct link.
    
3. Click on Green Coloured **Download button** based on your operating system (Windows, macOS, or Linux). For most users, choose the **64-bit Graphical Installer** for Windows.
    
4. Once the file is downloaded, open it to begin installation.
    
5. On the setup screen, click **Next** and select the checkbox to accept the license agreement.
    
6. Now select choose me option, as we are doing for ourselves only and click Next.
    
7. Now you will get to view the path where the anaconda navigator will be installed, you can change it or go with the default path. Click Next
    
8. Now you will get few checkboxes. Select **Add Anaconda to my PATH environment variable** and **Register Anaconda as my default Python** checkboxes and click on Next.
    
9. Click **Install** and wait for it to complete.
    
10. Once done, click **Finish**.
    

### ***Opening Anaconda Navigator***

1. After installating Anaconda Navigator in your device, search for **Anaconda Navigator** in your Start Menu or seach bar.
    
2. Open it. It might take a few seconds on the first run.
    
3. You’ll see a graphical dashboard with tools like this.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749492235136/9acb0fd7-5865-4c56-99d0-b87a2d30e055.png align="center")
    
4. Click **"Launch"** under **Jupyter Notebook** to start coding in your browser.
    

### *Running Jupyter from Command Line ( Alternative )*

You can also launch Jupyter without opening Anaconda Navigator:

1. Open **Anaconda Prompt** (from the Start Menu or Search Bar).
    
2. Type **jupyter notebook**
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749492402486/3a683b8a-2f83-4928-9fd4-3b6fed06c9a1.png align="center")
    
3. It will automatically open your browser with Jupyter’s interface.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749492430363/bc6f04f9-9e1d-4f8c-87dc-ccb00dcd48f1.png align="center")
    

## Creating your First Notebook in Jupyter

Once Jupyter Notebook opens in your browser, you will see a file explorer-like interface.

### ***To create a new notebook:***

1. On the right-hand side, click the **"New"** button.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749492445969/3120511c-ac1d-4d4b-95ad-b1b6de00d3a8.png align="center")
    
2. Under the dropdown, choose **“Notebook”** and then select **"Python 3 (ipykernel)"**.
    
3. A new tab will open ,this is your **notebook**, where you can write and run Python code interactively.
    
4. Click on the title (which will be untitled currently) at the top to rename your notebook (e.g., *FirstNotebook*).
    

### ***Running Code in a Notebook Cell***

Type this in the first cell:

```python
print("Hello, IronWill")
```

Press **Shift + Enter** or click the **Run** button in the toolbar.

Congratulations, you have just written and ran your first python program in Jupyter Notebook

## Installing Jupyter Notebook Using CMD (Without Anaconda)

If you are **not using Anaconda**, you can install **Jupyter Notebook manually** through the command line using pip, which is Python’s package manager.

1. Open Command Prompt
    
2. First, check if Python and pip are installed with commands: python —version and pip —version. If both commands return version numbers, you are good to go. If not, make sure Python is properly installed and added to your system path
    
3. Now write the command **pip install notebook**. This will install the full Jupyter Notebook package.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1749492521301/4a1a4395-819f-4813-a274-76e84d34899a.png align="center")
    
4. After installation, you can launch it by typing “**jupyter notebook**” . This will open Jupyter Notebook in your default browser.
    
5. If you also want to install **JupyterLab** (a more modern interface), run **“pip install jupyterlab” .**
    
6. Now you can launch it with jupyter lab.
    

---

Today, we have laid the foundation for your Python learning journey by setting up everything you need, from installing Python and Anaconda to launching Jupyter Notebook and VS Code. You're now fully ready to dive into the world of Python programming!

From **tomorrow onwards**, we will begin learning **Python from scratch**, step by step with no prior experience needed! So stay tuned, bring your curiosity, and let’s grow together as coders.

If you found this guide helpful, feel free to share it with your friends and let’s learn together!
