Visual Studio Code (VS Code) is a lightweight code editor that is widely used for Python and data analysis work. It supports code editing, running scripts, using notebooks, debugging, and managing environments in one place.
First, download and install Visual Studio Code on your system (Windows, macOS, or Linux). After installation, open VS Code and complete the basic setup.
Next, install the required extensions inside VS Code:
- Python extension (this enables running Python, linting, formatting, debugging)
- Jupyter extension (this lets you open and run .ipynb notebooks inside VS Code)
After installing extensions, set up Python inside VS Code:
- Open VS Code and press Ctrl+Shift+P (Command+Shift+P on macOS)
- Search for Python: Select Interpreter
- Choose the correct Python interpreter
- If you use Anaconda, select the interpreter from your conda environment
- If you installed Python directly, select the Python version you installed
Then test your setup:
- Create a new file named test.py
- Write a simple print statement
- Run the file using the Run button or the terminal
If you will use notebooks:
- Create a new file with .ipynb extension or open an existing notebook
- Make sure the kernel selected matches your Python environment
Finally, organise your work:
- Create one folder for the course
- Keep datasets in a data folder and notebooks in a notebooks folder
- Use a separate environment for the course so library versions stay stable
By the end of this setup, you should be able to write Python code, run scripts, and work with notebooks smoothly in VS Code.

