import sys
print(sys.version)
print(sys.executable)Installing VS Code and Connecting it with Anaconda
Introduction
This tutorial installs Visual Studio Code, installs Anaconda, and connects the two. It assumes you have never written a line of code. Every step has a screenshot. If a step fails, email me (danilo.freire@emory.edu) or ask one of the teaching assistants.
Why VS Code?
VS Code is a free code editor made by Microsoft. In the 2025 Stack Overflow Developer Survey, 75.9% of developers reported using it, more than twice the share of any other editor. Three reasons matter for this course.
- It does what an editor should do, with syntax highlighting, autocompletion, and a debugger built in. Hundreds of extensions cover anything missing.
- It runs on Windows, macOS, and Linux, so everyone in the class works with the same screen.
- It works with Git and GitHub out of the box, which you will need for every assignment.
Download and install VS Code
Open https://code.visualstudio.com/. Click “Download” for your operating system.

Windows
Run the VSCodeUserSetup-{version}.exe file.

Accept the licence agreement. Click “Next”.

Keep the default installation location. Click “Next”.

Select “Open with Code” under additional tasks. Click “Next”.

Click “Install”.

macOS
Open the downloaded .zip file.

Drag the VS Code application to the Applications folder.

Linux
Follow the instructions for your distribution on the VS Code download page.
Start VS Code
Open VS Code. The welcome screen appears.

Microsoft publishes short introductory videos and full documentation if you want to explore further.
Installing Anaconda
Anaconda is a distribution of Python. It ships with the packages this course uses, and it keeps the Python for one project separate from the Python for another.
Download Anaconda
Open https://www.anaconda.com/download. You can skip the registration.

Click “Download” for your operating system.

Windows
Select “Just Me” as the installation type.

Keep the default installation location.

The installer marks the next two options in red and advises against them. Select them anyway. They make the terminal commands in this course work without extra configuration.
Under “Advanced Options”, tick “Add Anaconda to my PATH environment variable”.
Tick “Register Anaconda as my default Python”.

macOS
Open the downloaded .pkg file. You can install Anaconda for all users.

Accept the default option on each screen.

Linux
Follow the instructions for your distribution on the Anaconda website.
Verify the installation
Open a terminal. In VS Code, click “Terminal” > “New Terminal”.
Type conda --version. Press Enter. The Conda version number appears.
Type python --version. Press Enter. The version of Python that Anaconda installed appears.

If either command reports that it is not found, Anaconda is installed but your terminal cannot see it. Close the terminal and open a new one. If the error persists, reinstall Anaconda and check the PATH option described above.
Connecting VS Code with Anaconda
Both programs are now installed. The next step tells VS Code to run Anaconda’s Python rather than any other Python on your machine.
Install the Python and Jupyter extensions
Click the Extensions icon in the left sidebar. It looks like four squares.
Type “Python” in the search box.

Install the official Python extension by Microsoft.
Install the Jupyter extension as well. Tutorial 02 needs it.

Select the Anaconda interpreter
Click “New File” in the top left corner. Save the file with a .py extension.

Type this code in the file:
Save the file again. I saved mine as testing-anaconda.py.

Press Ctrl+Shift+P (Windows and Linux) or Cmd+Shift+P (macOS). The Command Palette opens.

Type “Python: Select Interpreter”. Select it from the list.

Select the Anaconda interpreter. It is labelled something like “Python 3.x.x (‘base’) Conda”.
Verify the connection
Click “Run” in the top right corner of the editor. Select “Run Current File in Dedicated Terminal”.

The output shows the Anaconda Python version and the path to it. The word anaconda should appear in that path. If it does not, VS Code is running a different Python, and you should select the interpreter again.

Conclusion
VS Code and Anaconda are installed and connected, and you can run a Python file from the editor. As your projects grow, create a separate Conda environment for each one so their packages cannot conflict.
For more:
- VS Code Python tutorial: https://code.visualstudio.com/docs/python/python-tutorial
- Anaconda documentation: https://docs.anaconda.com/
- VS Code documentation: https://code.visualstudio.com/docs
Happy coding!