Setup Python Coding Workspace with VS Code
Setting up a coding workspace with Python and VS Code is straightforward. In this guide, we will install Python, install VS Code, configure a Python environment, and run our first Python program in a Jupyter notebook.
Install Python
- Download the latest Python installer from the official Python website.
- In the installer window click Add python.exe to PATH ⚠️
- Complete the installation.
Install VS Code
- Download VS Code from https://code.visualstudio.com/
- in the installer window, enable “Open with Code” in the Windows Explorer context menu.. It will help you open folders in VS Code easily.
- Complete the installation.
Integrate VS Code and Python
Now that both Python and VS Code are installed, let us create our coding workspace. The first time, there will be a few installations to complete, so be patient and read the prompts carefully before cancelling.
- Create a folder named codes/python in Explorer. Right-click on the folder > Open with Code.
- VS Code asks whether you trust the authors of the files in the folder; select
Trust. - Create a new file named test.ipynb.
- Click
+ Codeon top and typeprint("Hello World!") - Run the cell by clicking ▷. Click the prompt Install/Enable suggested extensions Python + Jupyter and wait for the installation to complete.
- Upon completion, there will be a prompt to select Python Environments…. Click and select the Python you just installed.
- click run ▷ again and in the prompt install
ipykernel. - Finally, you will see the output of the cell
Hello World!
Installing Packages with Pip
Now install some packages in Python.
- In the VS Code window press Ctrl + ` to open the integrated terminal.
- Check Python version by the
python -Vcommand. It should match the Python version you just installed. - for installing packages scipy and pymoosh give command
pip install scipy pymoosh - After installing, you can see the packages with the
pip listcommand.
Try the Notebook
import this
import antigravity
You now have a working Python + VS Code + Jupyter environment and are ready to start coding!
Further Reading
- Python for Beginners — The official Python beginner guide, including tutorials, documentation, and learning resources.
- Python Tutorial — The official tutorial covering Python syntax, data structures, functions, modules, and more.
- Real Python – Beginner Tutorials — Beginner-friendly tutorials and structured learning paths with practical examples and projects.
- Automate the Boring Stuff with Python — A practical introduction to Python through automation projects such as working with files, spreadsheets, PDFs, and web scraping. The current edition is available online for free.
- An Effective Python Development Environment by Martin Breuss
- https://realpython.com/learning-paths/
Enjoy Reading This Article?
Here are some more articles you might like to read next: