---
title: "VS Code Setup for Students: Python and Java Without Errors"
description: "VS Code setup for students: install it on a school laptop, set up Python and Java, and fix the errors students hit, from No module named to class is public."
canonical: https://learn.modernagecoders.com/vs-code-setup-for-students
source: src/pages/vs-code-setup-for-students.html
---
> VS Code setup for students: install it on a school laptop, set up Python and Java, and fix the errors students hit, from No module named to class is public.

In short

To set up VS Code for school, install three things: VS Code itself, the language extension (Python, or the Extension Pack for Java), and the language (a Python interpreter, or a Java JDK). Open your project folder with File, Open Folder, pick the interpreter in the Status Bar, and run from the play button. Modern Age Coders teaches Python and Java live to students in the US, in a batch or one to one.

Learn it with a teacher

## Three courses that start on your own laptop

Each is taught live on your own computer, so a teacher can help get the editor working early and keep the focus on code.

[![Python for Teens course thumbnail](/images/python-teens.webp)  VSC / 01 Python for teens Ages 13 to 18. VS Code, Python and real projects. Open the syllabus →](/courses/python-complete-masterclass-teens)[![Java for Teens course thumbnail](/images/java-teens.webp)  VSC / 02 Java for teens Ages 13 to 18. From the first class file to object-oriented programs. Open the syllabus →](/courses/java-programming-masterclass-for-teens)[![AP Computer Science A course thumbnail](/images/ap-computer-science-a.webp)  VSC / 03 AP Computer Science A High school. Java from the basics, built for the AP course. Open the syllabus →](/courses/ap-computer-science-a-java-exam-prep-course)

What to install

## Three pieces, not one: why VS Code alone runs nothing

The Python tutorial in the VS Code documentation says it directly: "three separate pieces work together to run Python in VS Code." Java works the same way. When nothing runs in week one, check that all three pieces are there.

| Piece | For Python | For Java |
| --- | --- | --- |
| The editor | VS Code, where you write and organize code | VS Code, the same editor |
| The extension | The Python extension; the docs note "The extension doesn't include Python itself." | Extension Pack for Java; the tutorial needs Language Support for Java by Red Hat and Debugger for Java |
| The language | A Python interpreter, installed separately | A Java Development Kit (JDK); the pack "supports Java version 1.8 or above" |
| An all-in-one option | None in the tutorial | The Coding Pack for Java bundles VS Code, a JDK and extensions, but "is only available for Windows and macOS" |

### Is VS Code free for students?

Yes, and not only for students. The VS Code FAQ says "VS Code is free for private or commercial use." There is no student edition to apply for.

Python and the JDK distributions the Java tutorial lists are also free to download, so a working setup costs nothing.

### VS Code is not Visual Studio

Visual Studio is a different, larger Microsoft product. If your teacher said VS Code, you want Visual Studio Code from code.visualstudio.com.

The pair is confused often enough that vs code vs visual studio shows up in search suggestions. For a school Python or Java class, VS Code is the one to install.

Installing

## Installing VS Code on a school or family laptop

If your school manages your laptop, you may not have an administrator password. The VS Code docs cover that case, and the Mac and old-Windows cases too.

| Your computer | What the docs say | Watch out for |
| --- | --- | --- |
| Windows, no admin password | The User setup "does not require administrator permissions" and is "the recommended installation for most people" | "Updates are disabled when VS Code runs as Administrator from a User setup installation." |
| Windows, family computer | "Setup adds Visual Studio Code to your %PATH% environment variable. Restart your console after installation" | Run code . in a folder to open it, after restarting the terminal |
| Mac | "Drag Visual Studio Code.app to the Applications folder." | Then open it from Applications by double-clicking the icon, as the docs describe |
| Mac, to use code in Terminal | Run Shell Command: Install 'code' command in PATH from the Command Palette | Restart the terminal afterwards |
| Mac with Apple silicon | The download page lists Universal, Intel chip and Apple silicon builds | Universal works on both |
| Windows 7 | "VS Code version 1.70.3 is the last available release for Windows 7 users" | Old laptops need a newer Windows for current VS Code |

### If Python will not install without admin

The Python tutorial in the VS Code docs offers a route: "If you don't have admin access, an additional option for installing Python on Windows is to use the Microsoft Store."

If the Store is blocked as well, ask your teacher or the school's tech office rather than looking for a workaround; the device belongs to the district.

### Mac students: one Python warning

The VS Code docs say "The system install of Python on macOS is not supported." They recommend Homebrew, with brew install python3 in Terminal.

The python.org installer is the other common choice for students. Either way, use a Python you installed, not the one the Mac shipped with.

Python

## Setting up Python in VS Code, and the three errors that follow

Follow the steps in order. Each one matches a step in the VS Code Python tutorial, and each error below appears when one is skipped.

1. **Install Python** from python.org (Windows) or Homebrew (Mac).
2. **Check it.** In a new terminal, run py -3 --version on Windows or python3 --version on a Mac.
3. **Install the Python extension** from the Extensions view in VS Code.
4. **Open a folder, not a file.** File, Open Folder. In the docs' words, that folder becomes your "workspace".
5. **Create an environment.** Command Palette, Python: Create Environment, choose Venv, then the interpreter you installed.
6. **Select the interpreter.** Python: Select Interpreter, or click the Python version in the Status Bar.
7. **Create a .py file,** type a line of code and save it.
8. **Run it** with the Run Python File play button in the top-right of the editor.

***A ten-second check · which Python is VS Code using?**python*

```
# check_setup.py  (ours) run with Run Python File
import sys
print(sys.version)       # which Python is running
print(sys.executable)    # where it lives on disk

# In the VS Code terminal on Windows, the docs suggest:
#   py -3 --version
#   py -0      (lists installs; * marks the default)
# Our run of py -0:
#   -V:3.13 *        Python 3.13 (64-bit)
```

If sys.executable does not point into your project's .venv folder, VS Code is using a different Python from the one your packages went into.

| What you see | Why | Fix |
| --- | --- | --- |
| "ModuleNotFoundError: No module named 'numpy'" | The tutorial says it means "the required package isn't available in your interpreter" | In the VS Code terminal for that interpreter, run python -m pip install numpy (Windows) or python3 -m pip install numpy (Mac) |
| Python installed, but VS Code or the terminal cannot find it | A terminal reads system settings only when it starts | The docs say: "close and reopen the terminal (or restart VS Code)" |
| Packages vanish when you switch projects | Each virtual environment keeps its own packages | Pick the right interpreter in the Status Bar; share setups with pip freeze > requirements.txt |

Java

## Setting up Java in VS Code, and the file-name error every AP student meets

Java in VS Code needs a JDK and the Java extensions. Our AP Computer Science A course is taught in Java, and its students tend to meet the same two compile errors in their first week.

***Broken · the class name and file name disagree**java*

```
// Saved as Greeting.java  (broken on purpose, ours)
public class Hello {
    public static void main(String[] args) {
        System.out.println("Hi from VS Code");
    }
}

// Our run, javac 22.0.1:
// Greeting.java:1: error: class Hello is public,
//   should be declared in a file named Hello.java
```

In Java, a public class must live in a file with exactly the same name, including capital letters. This is a Java rule, not a VS Code one, so it appears in every editor.

***Fixed · rename the file to match the class**java*

```
// Saved as Hello.java  (fixed, ours)
public class Hello {
    public static void main(String[] args) {
        System.out.println("Hi from VS Code");
    }
}

// Our run: javac Hello.java, then java Hello
// Hi from VS Code
// Leave out the semicolon and javac 22.0.1 says:
// Hello.java:3: error: ';' expected
```

Rename the file in the VS Code Explorer, or rename the class; the two must match. Case matters: hello.java is a different name from Hello.java.

### Open the folder, or the language server stalls

The Java tutorial warns: "If you open a Java file in VS Code without opening its folder, the Java Language Server might not work properly." Symptoms are red squiggles everywhere, no Run button, or no code completion.

Fix it with File, Open Folder on the folder that holds your .java files. For a school project with a build tool, open the project's top folder.

### When Run is missing: lightweight mode

The Java project docs explain that "Lightweight mode doesn't resolve imported dependencies nor build the project", so it cannot run or debug. Click the Java status item in the Status Bar to switch to standard mode.

If things are still strange, the docs suggest the Java: Clean Java Language Server Workspace command, which rebuilds the language server's view of your project.

Sources, read 17 October 2026: [Getting Started with Java in VS Code](https://code.visualstudio.com/docs/java/java-tutorial) and [Managing Java Projects in VS Code](https://code.visualstudio.com/docs/java/java-project); compile errors from our own run of javac 22.0.1 on Windows 11. We are not connected with Microsoft.

When it still fails

## Ten checks when VS Code will not run your code

Our checklist for the evening before an assignment is due. Work through it in order and stop at the first check that explains the error.

1. **Is the language installed?** VS Code does not include Python or a JDK. Check with a version command in a new terminal.
2. **Is the extension installed and enabled?** Search @installed in the Extensions view.
3. **Did you open the folder?** File, Open Folder, not a single file from Downloads.
4. **Is the right interpreter selected?** Look at the Python version in the Status Bar and click it to change.
5. **Did you restart the terminal?** After any install, open a fresh terminal so PATH is read again.
6. **Read the whole error.** Copy the last line into your notes before trying anything.
7. **Java: does the file name match the class?** Hello.java for public class Hello.
8. **Java: is it lightweight mode?** Switch to standard mode from the Status Bar.
9. **Is the code saved?** The docs note that Run Python File in Terminal saves the file automatically; with any other run method, save first.
10. **Try a one-line program.** If print("hi") runs, the setup works and the problem is in your code.

### About the AI features

Current VS Code versions include AI chat features linked to GitHub Copilot. They are optional, and the VS Code FAQ says that if you disable AI functionality or do not sign in, your data is not sent to the Copilot back end.

While students are learning to read errors, we keep AI chat switched off in lessons, so they learn to fix problems themselves. Check your school's rules before turning such tools on for coursework.

### What we will and will not do

A teacher can set up VS Code with you on a shared screen, explain each error, and make sure your own laptop works for the rest of the year.

We do not write or finish graded assignments. We teach the concept so you can solve the assignment yourself.

A first term

## What a first term looks like when the setup is done right

Our plan for students who are new to a real code editor. The first two classes deal with setup so it never gets in the way again.

| Classes | What the student does | What it builds |
| --- | --- | --- |
| 1 to 2 | Install, open a folder, run a first file | A setup that works every time |
| 3 to 4 | Variables, input and output | Reading the terminal, saving often |
| 5 to 6 | Decisions and loops | Using the debugger and breakpoints |
| 7 to 8 | Functions or methods | Splitting code across files |
| 9 to 10 | A project with a package or class | Environments, imports, file names |
| 11 to 12 | Version control with Git | Committing work from inside VS Code |

### Middle school

In our classes, students in Grades 6 to 8 start with Python, where one file and one play button go a long way.

### High school

Students heading for AP Computer Science A add Java in the second term with us, in the same editor.

### College

We have college students set up one environment per course from day one, which saves a lot of grief at midterms.

For the AP course itself, see [AP Computer Science A online classes](/ap-computer-science-a-online-classes); for Java outside the AP track, [Java classes for teens](/java-classes-for-teens); and for choosing an editor at all, our post on [Java IDEs for beginners](/blog/best-java-ides-for-beginners).

Where a student is

## Four stages of working in a real editor

From fighting the setup to forgetting it is there.

| Stage | What it looks like |
| --- | --- |
| 1. Installer | VS Code is installed, but nothing runs yet |
| 2. Runner | Runs single files with the play button |
| 3. Organizer | Works in folders, environments and projects |
| 4. Debugger | Uses breakpoints and reads errors before searching |

### For parents

If your child is stuck at stage 1, it is almost never their fault: one of the three pieces is missing. Once all three pieces are in place, the setup keeps working.

On a school-managed laptop, some installs are blocked on purpose. Check with the school before working around anything.

### For students

Always open the folder. Half of all VS Code mysteries disappear with that one habit.

Look at the Status Bar. It tells you which Python or which Java mode you are in.

The catalogue

## Nine courses taught in a real editor

All live online with a regular teacher, in a batch or one to one.

I

### Teens

Ages 13 to 18

VSC / TEN / 01

#### Python for teens

Projects in VS Code.

[Open the syllabus](/courses/python-complete-masterclass-teens)

VSC / TEN / 02

#### Java for teens

Classes, objects, real programs.

[Open the syllabus](/courses/java-programming-masterclass-for-teens)

VSC / TEN / 03

#### JavaScript for teens

Websites built in the editor.

[Open the syllabus](/courses/javascript-course-for-teens-beginners-interactive-web)II

### Exams and tools

High school

VSC / EXM / 01

#### AP Computer Science A

Java for the AP course.

[Open the syllabus](/courses/ap-computer-science-a-java-exam-prep-course)

VSC / EXM / 02

#### Git and GitHub for teens

Commit and push from VS Code.

[Open the syllabus](/courses/git-github-version-control-course-for-teens)

VSC / EXM / 03

#### Full-stack web for teens

Front end to server.

[Open the syllabus](/courses/full-stack-web-development-teens-masterclass)III

### College and adults

Ages 18 and up

VSC / PRO / 01

#### Python, zero to advanced

For college and beyond.

[Open the syllabus](/courses/python-programming-masterclass-zero-to-advanced-college)

VSC / PRO / 02

#### Java for college

Complete Java, live.

[Open the syllabus](/courses/complete-java-programming-masterclass-college)

VSC / PRO / 03

#### Git and GitHub for college

Collaboration on real repos.

[Open the syllabus](/courses/git-github-version-control-course-for-college-students)

How lessons run

## Live lessons on your own laptop

Weekdays or weekends, flexible: choose your batch, or for a very personalised plan choose 1-on-1 at your convenience, weekend mornings or weekdays.

Weekdays

After-school batches in US time zones.

Weekends

Good for a full setup session.

1-on-1

When an assignment is due soon.

### One teacher

The same person all term.

### Your machine

We fix the setup you will use.

### Screen sharing

Errors read together, live.

### You do the work

Graded work stays your own.

### Anywhere in the US

Online, from home.

### Batch or solo

Fifteen to twenty, or one student.

Student work

## Projects our students built in their own editors

Apps and programs from students who once could not get the play button to work. More on the [student labs](/student-labs) page.

![NutriLife AI nutrition coach project screenshot](/images/projects/nutrilife.webp)

AI and ML

#### NutriLife

An AI nutrition coach that reads what you eat and works you toward a target.

by Bhavya · [Open it](https://nutrilife-bhavya.lovable.app)

![Misti AI chatbot for maths and coding screenshot](/images/projects/misti.webp)

AI and ML

#### Misti

A chatbot that answers mathematics and programming questions, built and deployed by a student.

by Harshit · [Open it](https://misti.modernagecoders.com)

![GuardianX AI internet safety assistant screenshot](/images/projects/guardianx.webp)

AI and ML

#### GuardianX

An assistant that helps a young person recognise unsafe situations online.

by Vivaan · [Open it](https://guardianx-cybersaver.lovable.app)

![SkyCast weather forecast application screenshot](/images/projects/skycast.webp)

Web app

#### SkyCast

A weather forecasting site with live conditions for any location.

by Krish

Fees

## Fees

VS Code, Python and a JDK are all free. Our fee is for the teaching, charged per month in US dollars, with no semester-long agreement and no charge after you decide to stop.

Free first class

USD 0

no card required

- A free first lesson
- We can start with your setup
- No card details

Book it

Group batch

USD 100

a month, billed in US dollars

- Fifteen to twenty students
- A regular teacher
- Your choice of batch
- Month by month

Start here

One to one

USD 150

a month, billed in US dollars

- Private lessons
- Booked at your convenience
- Your own course and laptop

Enquire

What families say

## Rated 4.9 across 547 Google reviews

Word-for-word Google reviews from parents.

★★★★★

"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."

Ria Mukherjee

Parent

★★★★★

"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."

Samriddha Mondal

Student

★★★★★

"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."

Vansh Agarwal

Student

★★★★★

"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."

Sonam Oswal

Parent of Dhairya

★★★★★

"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."

Sonu Goyal

Parent

★★★★★

"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."

Ritu Kedia

Parent

Questions students ask

## VS Code setup: common questions

### Is VS Code free for students?

Yes. The VS Code FAQ says VS Code is free for private or commercial use, so there is no student version to apply for. Python and the free JDK builds the Java tutorial lists cost nothing either.

### Why is VS Code not working with Python?

Usually one of three pieces is missing: VS Code, the Python extension, or Python itself. The extension does not include Python. Install Python, restart the terminal, then choose the interpreter with Python: Select Interpreter.

### How do I select the Python interpreter in VS Code?

Click the Python version shown in the Status Bar, or open the Command Palette and run Python: Select Interpreter, then choose your project environment or the Python you installed.

### Why does VS Code say No module named numpy?

The package is not installed in the interpreter VS Code is using. In the VS Code terminal for that interpreter, run python -m pip install numpy on Windows or python3 -m pip install numpy on a Mac.

### How do I set up Java in VS Code?

Install a JDK and the Extension Pack for Java, or on Windows and macOS use the Coding Pack for Java, which bundles both with VS Code. Then open the folder that holds your .java files.

### Why does Java say class is public, should be declared in a file named?

A public class must be in a file with exactly the same name. Our run of public class Hello in Greeting.java failed for that reason. Rename the file to Hello.java, matching capital letters.

### Can I install VS Code on a school laptop without admin rights?

The VS Code docs say the Windows User setup does not require administrator permissions. Your school may still block installs, so check with your teacher or school tech office first.

### Will you do my coding assignment?

No. We help you set up your tools and teach the ideas so you can finish your own assignment. We never complete graded work.

### What times are classes for US students?

Weekdays or weekends, flexible. Choose your batch, or for a very personalised plan choose 1-on-1 at your convenience, weekend mornings or weekdays.

### How much do Python or Java classes cost?

The first lesson is free. After that you pay monthly for live lessons, and the fees section on this page shows the amount in US dollars.

Elsewhere on this site

## Related pages

More for US students using real code editors.

### [Coding classes in the USA](/coding-classes-in-united-states)

The full list of our pages for the US.

### [AP CSA online classes](/ap-computer-science-a-online-classes)

Java for the AP course.

### [Java classes for teens](/java-classes-for-teens)

Java beyond the AP track.

### [Java IDEs for beginners](/blog/best-java-ides-for-beginners)

Comparing editors before you install.

### [Git vs GitHub](/blog/git-vs-github-difference)

The next tool after the editor.

### [Python for 15 year olds](/python-for-15-year-olds)

A high school starting point.

### [GitHub Classroom help for students](/github-classroom-help-for-students)

GitHub Classroom retired on August 28, 2026: what students need to know.

### [Google Colab help for students](/google-colab-help-for-students)

Google Colab not working? Runtimes, files, Drive and limits, explained.

### [Jupyter Notebook errors for students](/jupyter-notebook-errors-for-students)

Jupyter Notebook errors students hit, what they mean, and how to fix them.

Start here

## Book a free first lesson

Tell us which class needs VS Code and what error you see. The first lesson can be spent getting your laptop working.

To see the method first, read about [our live lessons](/how-we-teach), or look through [every course](/courses) and its syllabus.

[WhatsApp us](https://wa.me/919123366161?text=Hello%20Modern%20Age%20Coders%2C%20my%20teenager%20in%20the%20US%20needs%20help%20setting%20up%20VS%20Code%20for%20Python%20or%20Java%20for%20school.%20Could%20we%20book%20a%20free%20first%20lesson%3F) · [+91 91233 66161](tel:+919123366161) · [connect@modernagecoders.com](mailto:connect@modernagecoders.com)

Classes run online with teachers in India, so students join from any state without traveling. Message us on WhatsApp for the fastest reply.

### Want a class sooner? Book a priority demo

A priority demo is a full class of about 45 to 60 minutes. After the class the mentor sends a written skill report and a personal learning roadmap on WhatsApp. If you enrol, the demo fee is adjusted against your first month's fee. Share your demo Order ID with us on WhatsApp and we take it off.

[Book a priority demo](/book-demo)

## Keep exploring Modern Age Coders

### Related courses and guides

- [We Teach You How to Think](/we-teach-you-how-to-think)
- [Video Game Design for Kids in Australia](/video-game-design-for-kids-australia)
- [Web Application Development Company](/web-application-development-services)
- [Video Game Coding Classes for Kids: Live Online, Ages 6 to 17](/video-game-coding-classes-for-kids)
- [What Happens in a Demo Class](/what-happens-in-a-demo-class)
- [Vibe Coding for Teens](/vibe-coding-for-teens)
- [Best Coding Classes for Kids in Houston](/best-coding-classes-for-kids-in-houston)
- [Student Hackathons in Australia: Who Can Enter, How to Prepare](/australian-student-hackathons)
- [Programming Languages, Frameworks and Tools to Learn in 2026](/coding-lang)
- [Best Coding Classes in Mount Isa](/best-coding-classes-in-mount-isa)

### Learn more

- [Coding for Class 9: CBSE/ICSE CS, Python, Java, Full Stack & DSA](/coding-for-class-9)
- [Python Games for Kids: Code Your First Game, Then Pygame](/python-games-for-kids)
- [ICSE Class 10 BlueJ Java Coaching](/icse-class-10-bluej-java-coaching)
- [Python for Class 9: CBSE Code 402 Python, Flask, Django Intro & Kaggle](/python-for-class-9)

### Free resources

- [Python Tutorial for Beginners: Complete Guide](/resources/python)
- [Methods in Java](/resources/java/methods-in-java)
- [Strings in Python](/resources/python/strings-in-python)
- [Your First Java Program](/resources/java/your-first-java-program)

### From the blog

- [Python Tutorials & Guides](/blog/topic/python)
- [How to Reverse a String in Python: 5 Easy Methods](/blog/how-to-reverse-a-string-in-python)
- [How to Find HCF and LCM in Python (5 Easy Methods)](/blog/how-to-find-hcf-and-lcm-in-python)
- [Top 10 Java Programs Every School Student Should Know (With Solutions)](/blog/top-10-java-programs-for-school-students)

### Start here

- [About Modern Age Coders, teaching since 2020](/about)
- [Modern Age Coders pricing, one honest price per plan](/pricing)

Free class[Priority demo](/book-demo)[Call us](tel:+919123366161)

---

*Canonical: https://learn.modernagecoders.com/vs-code-setup-for-students*
