Open In App

Setting Up a Data Science Environment in Python

Last Updated : 02 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Data Science is about understanding the data using programming and statistics. But before you begin working on any project it’s important to prepare your computer by setting up the right tools. This article will guide you how to setup data science environment in python. Also make sure you have a laptop with at least 4 GB of RAM so that everything runs smoothly.

Step 1: Choose the Right Python Distribution

The first step in setting up a data science environment is to choose the right Python distribution. There are several options available including Anaconda, Miniconda and Python.org. Among these Anaconda is the most popular choice for data science. It comes with a package manager called conda which makes it very easy to install and manage all the tools and libraries you’ll need. It includes various features:

  • It includes all the tools and technologies needed for data science.
  • You can easily add more tools later as your projects grow.
  • It has simple and user-friendly interface.
  • It supports version control so that you can track changes of your work.
  • It comes with many built-in libraries useful for data science.

Step 2: Installing Python

Go to https://www.python.org/downloads and download Python for your operating system.

Download-Python
Download Python

Open Command Prompt and type:

python --version

A version number should appear else the installation is faulty or incomplete. If so uninstall Python from the Control Panel and reinstall it again.

Python-installation
Check Python installation

Step 3: Install Anaconda

To install Anaconda follow these steps:

  1. Download Anaconda: Visit the Anaconda website and then download the latest version of Anaconda for your operating system.
  2. Install Anaconda: Run the installer and follow the prompts to install Anaconda.
  3. Verify Installation: Open a terminal or command prompt and type conda --version to verify that Anaconda has been installed successfully or not.

For step-by-step instructions on how to set up Anaconda for a Data Science environment refer to this link : article

Step 4: Create a Virtual Environment

To keep your data science work organized and avoid any issues between different projects it's a good idea to create a virtual environment. Once your virtual environment is ready the next step is to install some important packages. These packages help you work with data build models and create charts. Here are some of the most commonly used packages and what they do:

  1. NumPy: conda install numpy
  2. Pandasconda install pandas
  3. Scikit-learn: conda install scikit-learn
  4. Matplotlib: conda install matplotlib
  5. Seaborn: conda install seaborm
  6. Jupyter Notebook: conda install jupyter

Step 5: Setting Up Jupyter Notebook

Jupyter Notebook is a popular tool used for writing and running Python code in a clean and interactive way. It looks like a notebook where you can write code, text and even make charts all in one place. After installation open Anaconda Navigator from your Start Menu or Applications. You'll see a dashboard with several tools. One of them is Jupyter Notebook. In Anaconda Navigator click the Launch button under Jupyter Notebook.

Screenshot-2024-07-09-192627
Open Jupyter Notebook

A new tab will open in your default web browser. This tab is the Jupyter Notebook interface. From here you can create new notebooks and write code.

Open-new-Jupyter-notebook
Open new Jupyter notebook

Integrated Development Environments (IDEs)

An Integrated Development Environment (IDE) enhance your coding experience by providing features like code completion, debugging and project management.

  1. PyCharm: PyCharm is widely used IDEs for writing Python code. Just install it and connect it to your Conda environment.
  2. Visual Studio Code: Visual Studio Code is another popular IDE that supports Python development. Install the Python extension and configure it to use conda environment.

Step 6: Set Up Git for Version Control

Version control is essential for collaborative projects and tracking changes. Git is a popular version control system that integrates well with Python.

  1. Install Git: Install Git from https://git-scm.com/downloads and install it using default settings.
  2. Initialize a Git Repository: Initialize a Git repository in your project directory using git init.
  3. Add Files to the Repository: Add your files to the repository using git add and git commit.

Git locally maintains a local history of all the versions of the project and serve as a supplement to GitHub. It externally maintains the version history of different branches of a project. To use GitHub create an account on :

www.github.com


Next Article

Similar Reads