Week 1 of My Data Science Journey: Every Python Command I Learned, Every Mistake I Made, and the GitHub & Virtual Environment Problems Nobody Talks About

 

VS Code workspace showing Python data science folder structure and Jupyter notebook
Image 1: setup of vs code 

When people post their Data Science journey online, they usually show beautiful graphs, machine learning models, and polished GitHub repositories.

Very few people show the reality.

The first week is mostly confusion.

You don't struggle with Artificial Intelligence.

You struggle with Git.

You struggle with Python environments.

You struggle with why a library refuses to install after following five different YouTube tutorials.

This blog is my complete Week 1 documentation.

Not only what I learned, but every command I used, every mistake I made, why those mistakes happened, and how I fixed them.

If you're starting Data Science on Ubuntu, especially using VS Code, Jupyter Notebook, GitHub, and virtual environments, this article may save you several hours.


My Goal

I am documenting my entire journey publicly.

Not because I already know Data Science.

Because I don't.

I want every future researcher or student to see what learning actually looks like.

My repository is becoming my laboratory notebook.

Every notebook represents one day of learning.

Every commit represents one step forward.

📁 Follow Along on GitHub: You can check out the exact code, notebooks, and structure for this project in my Cosmology DataScience GitHub Repository.


Development Environment

Before writing even one line of Python, I configured my development environment.

  • Operating System: Ubuntu Linux
  • Editor: Visual Studio Code
  • Version Control: Git + GitHub
  • Notebook: Jupyter Notebook
  • Virtual Environment: Python virtual environment (.venv)

Folder Structure

I organized my project like this:

Cosmology_DataScience/
│── .venv/
│── .git/
│── README.md
│── requirements.txt
│── week-01-python-fundamental/
      ├── day-01-variables.ipynb
      ├── day-02-input-output.ipynb
      ├── day-03-if-else.ipynb
      ├── day-04-loops.ipynb
      ├── day-05-functions.ipynb
      ├── day-06-mini-project.ipynb
      └── day-07-motion-analyzer.ipynb

This structure may look simple.

Later, when projects become larger, organization matters more than code.

showing folder name
Image 2: organized folder structure

 


What I Learned During Week 1

Day 1: Fundamentals

  • Variables
  • Data Types
  • Printing
  • Comments
  • Basic calculations

Example:

mass = 8
velocity = 9

Day 2: Interaction

  • Taking user input
  • Type conversion
mass = float(input("Enter mass: "))

This small concept is the foundation of interactive programs.

Day 3: Control Flow

Conditional statements (if, elif, else).

Physics example: Classifying stars based on temperature.

if temperature > 9000:
    print("Hot Star")
elif temperature > 4000:
    print("Warm Star")
else:
    print("Cold Star")

This was the first time I realized programming is basically decision making.

Day 4: Iteration

Loops (for, while).

Instead of writing print() multiple times, one loop can repeat work automatically. Physics exercises included:

  • Free Fall
  • Rocket Fuel Simulation
  • Distance Travelled
  • Temperature Conversion

Day 5: Modularity

Creating reusable code with functions:

def force(mass, acceleration):
    return mass * acceleration

This changed how I think about programming. Instead of writing calculations repeatedly, I could build small reusable tools.

Physics Functions I Created: Force, Momentum, Kinetic Energy

def momentum(mass, velocity):
    return mass * velocity

def kinetic_energy(mass, velocity):
    return 0.5 * mass * velocity**2

Day 6: Mini Project

Object Physics Calculator

  • User enters: Mass, Velocity, Acceleration
  • Program calculates: Force, Momentum, Kinetic Energy

This was my first small physics application.

Day 7: Data Structures & Visualization

  • Lists
  • Average velocity
  • Distance approximation
  • Basic plotting
  • Velocity vs Time graph

This was my first step toward scientific visualization.

Basic velocity versus time scientific graph generated using Python Matplotlib
Image 3: week 1 successfully compelete

 


Git Commands I Used

  • Initialize repository: git init
  • Check repository: git status
  • Add files: git add .
  • Commit: git commit -m "Add Week 1 Python notebooks"
  • Connect GitHub: git remote add origin <repository_url>
  • Push: git push -u origin main

These five commands became part of my daily workflow.


Linux Commands I Learned

  • Show current directory: pwd
  • List files: ls
  • Show hidden files: ls -a
  • Activate virtual environment: source .venv/bin/activate

My Biggest Blunders (And What They Taught Me)

Most tutorials skip this part. I'm not.

Blunder 1: Missing Remote Repository

  • What happened: I tried pushing to GitHub before adding a remote.
  • Error: fatal: 'origin' does not appear to be a git repository
  • Lesson: Git doesn't know where to upload your code until you connect a remote repository.

Blunder 2: Authentication Failures

  • What happened: I tried using my GitHub account password.
  • Error: Password authentication is not supported
  • Lesson: GitHub no longer accepts account passwords for Git operations. You must use a Personal Access Token or GitHub Authentication through VS Code.

Blunder 3: Syntax Sensitivities

  • What happened: I accidentally typed git add. instead of git add .. One missing space, five minutes of confusion.
  • Lesson: Programming is extremely sensitive to syntax.

Blunder 4: The Externally Managed Environment Error

  • What happened: I ran pip install matplotlib globally, and Ubuntu refused.
  • Error: Externally Managed Environment
  • Lesson: Python wasn't broken. Ubuntu was protecting the system installation.

The Concept Nobody Explained Properly: Virtual Environments

This was probably the biggest lesson of my week.

A virtual environment is basically a private Python installation for your project. Instead of installing packages for the entire operating system, they stay inside .venv. Every project can have different versions and different libraries with no conflicts.

Activating Virtual Environment

source .venv/bin/activate

When activated, the terminal changes from muskan@ to (.venv) muskan@. That small text means you're using the project's isolated Python environment.

Terminal output showing Python virtual environment activation with .venv prefix on Ubuntu

Image 4 : setup of virtual environment looks like 


 

Installing Packages

Inside the virtual environment:

pip install matplotlib

Now only this project has matplotlib, not every Python program on my computer.


Another Mistake: The Jupyter Kernel Trap

Even after installing matplotlib, I still got errors.

Eventually I learned: Sometimes the problem isn't the package. It's the notebook kernel.

Restarting the Jupyter Kernel solved issues that reinstalling packages couldn't. That was a lesson I hadn't seen emphasized in beginner tutorials.


Commands That Saved Me

  • Checking files: ls -a
  • Finding virtual environment: find ~ -type d -name ".venv"
  • Checking Git remote: git remote -v
  • Checking installed packages: pip list
  • Verifying matplotlib: python -c "import matplotlib"

What I Realized About Data Science

After one week, I haven't built an AI model.

I haven't trained a neural network.

I haven't analyzed a massive dataset.

But I built something more important: I built the foundation.

Data Science isn't only statistics or machine learning. It's learning how to manage code, organize projects, work with version control, isolate dependencies, debug environments, and think computationally. Those skills are invisible in most tutorials but essential in real projects.


Week 1 Outcomes

By the end of the week I could:

  • Write Python programs confidently.
  • Use variables, loops, functions, and lists.
  • Build small physics-based applications.
  • Use Git for version control and push projects to GitHub.
  • Understand why virtual environments matter and install project-specific libraries correctly.
  • Debug common Ubuntu and VS Code issues.
  • Create my first scientific plot with Matplotlib.
  • Document my learning in a structured repository.

Advice to Every Beginner

Don't measure your first week by how many algorithms you know.

Measure it by how much confusion you can now explain.

Every error message you understand is progress. Every Git command you memorize is progress. Every debugging session is progress.

The goal isn't to avoid mistakes. The goal is to understand why they happened. That's when you're no longer just following tutorials—you've started learning how software actually works.


What's Next?

In Week 2, I'll begin working with NumPy, scientific arrays, vectorized computation, and more realistic physics calculations. The goal is to move from basic Python syntax toward the numerical tools used in scientific computing and data science.

Want to check out the repository?

View Project on GitHub      

Written by Muskan jain

Learning Data Science and Observational Cosmology from scratch. Documenting every error, breakthrough, and line of code publicly.

Connect: GitHub | LinkedIn

Comments

  1. Hey everyone! 👋 Thanks for reading through my Week 1 chaos.

    If you're currently stuck on any of these exact same errors (especially that dreaded Ubuntu externally managed environment error or Git authentication issues), drop a comment below—I'd love to help if I can, or we can figure it out together!

    Also, feel free to check out the exact code and notebooks over at my GitHub Repository.

    What was the most annoying bug you faced during your very first week of coding? Let me know below! 👇

    ReplyDelete

Post a Comment

Kindly keep comments respectful and related to the topic

Popular posts from this blog

What Is Big Bang Theory And Its History In Cosmology ?? For Beginners

All About Dark Matter You Need To Know