What is Visual Studio Code?
Visual Studio Code is Microsoft’s extensible code editor for local and remote development. It combines editing, source control, debugging and terminal access with language extensions and AI agent integrations. The editor itself is free for commercial use; runtimes, extensions, remote compute and AI subscriptions form separate parts of a working development setup.
Who is Visual Studio Code for?
Developers wanting a configurable cross-platform editor for multiple languages
Separate the editor, extension and interpreter
Visual Studio Code provides the editing interface. The Python extension adds language support, while a separately installed interpreter executes Python. Microsoft’s Python setup tutorial explains those three components.
An environment mismatch is worth investigating when installation succeeds in one place but the program cannot import the package elsewhere. The right first question is which executable actually ran each operation.
Visual Studio Code features
The core capabilities to consider for your workflow.
- Language support through extensions
- Git source control integration
- Debugging and integrated terminal
- Remote SSH, containers and WSL workflows
- AI agent and Copilot integration
What happened in two fresh Python environments?
On 17 October 2026, we ran an offline experiment with Python 3.9.6. We created two isolated virtual environments, built a tiny fictional package locally and installed it using each environment’s own pip. The package had no dependencies or build hooks.
Before installation
Neither environment could import sr_environment_demo. Both reported ModuleNotFoundError.
Installed into A only
The import succeeded in A. The same import in B still raised ModuleNotFoundError. A successful installation did not make the package available to the other environment.
Installed into B too
The import then succeeded in both environments. Each loaded its own installed copy from its own environment directory.
We invoked explicit interpreter paths without activating either environment. No package index was contacted. Both temporary environments were removed after the checks. This was a Python and pip experiment; no VS Code extension, debugger or notebook was operated.
Download the offline Python example
The kit contains the runner, recorded results and instructions. It requires installed Python 3.9+ with venv and bundled ensurepip. It accepts no existing environment path.
Visual Studio Code pricing
Free plan available
No editor seat subscription is required. Review any AI provider, paid extension, cloud development environment or infrastructure separately.
Calculate the cost of your quote →Free access & evaluation
The editor is free for private and commercial use; Copilot and other connected services have separate access terms.
Before you choose Visual Studio Code
Some language and debugging workflows require extensions or external runtimes
AI usage and remote compute are not made unlimited by the free editor
Extension selection and policy need maintenance in managed environments
Compare the executable before changing packages
- In the failing script, print
sys.executableafter importingsys. - Use that exact executable with
-m pip --versionand-m pip showfollowed by the intended package name. The pip user guide describes those inspection commands. - Check the project environment through Python: Select Interpreter. Open a terminal for that environment and verify its executable too. See Microsoft’s environment guidance.
- If only debugging fails, inspect the
pythonoverride inlaunch.json, described in the debugger documentation. - For a notebook, inspect its kernel picker and print the executable inside a cell. Follow the Jupyter kernel guidance for a remote server or another kernel.
Matching paths narrows the investigation; it does not rule out a misspelled import, a different distribution name, local file shadowing or another dependency error. Preserve the full traceback and check the actual module named in it. Python’s virtual-environment documentation explains environment isolation and explicit execution without activation.
For a related package-manager problem, see the npm profile. The Git profile covers keeping project changes separate from remote hosting operations.
Explore Visual Studio Code in more detail
Take a closer look at the decisions behind this product.
Compare Microsoft development environments
Read the articleCompare Visual Studio Code
WebStorm vs Visual Studio Code
Compare WebStorm and VS Code for JavaScript and TypeScript navigation, refactoring, debugging, extension setup and the environment your team can reproduce.
Read the comparisonPhpStorm vs Visual Studio Code
Compare PhpStorm and VS Code for PHP navigation, framework work, debugging, interpreters, extensions and a reproducible application setup.
Read the comparisonOracle JDeveloper vs Visual Studio Code
Compare Oracle JDeveloper vs Visual Studio Code for Java application development environments.
Read the comparisonVisual Studio Code vs Visual Studio
Visual Studio Code vs Visual Studio: compare editor extensions, integrated IDE tools, .NET workflows, commercial use and Community eligibility.
Read the comparisonExplore the individual profiles
Visual Studio Code FAQs
Does the Visual Studio Code Python extension install Python?
No. The editor, Python extension and Python interpreter are separate pieces. Install an appropriate interpreter as well as the extension; the extension supplies editor support rather than the Python runtime.
Why does Visual Studio Code show ModuleNotFoundError after pip installed a package?
Check which interpreter runs the file and which received the package. In our offline experiment, installing a fictional package into environment A left environment B raising ModuleNotFoundError. This demonstrates one cause, not every import failure.
How do I select a Python interpreter in Visual Studio Code?
Use Python: Select Interpreter from the Command Palette or the environment control in the Status Bar. Choose the environment intended for the project, then confirm the executable used by the actual run.
How can I check whether Python and pip use the same environment?
Print sys.executable in the failing run. Using that exact interpreter, run -m pip --version and -m pip show with the package name. Compare the reported locations before reinstalling anything.
Do I have to activate a Python virtual environment to run it?
No. Our experiment invoked each environment’s Python by its full path, without activation. Python documents activation as a convenience for command lookup. An explicit interpreter path can select the environment directly.
Why does the Visual Studio Code debugger use a different Python interpreter?
The debugger normally uses the selected environment, but a python property in launch.json can override it. Check that configuration alongside the executable printed during debugging.
Does selecting a Visual Studio Code interpreter also select my notebook kernel?
Check the notebook’s kernel picker separately. A notebook can use a Python environment or a connected Jupyter server. Confirm sys.executable inside a running cell rather than assuming the terminal and notebook match.

