Environments
VS Code Workspace
A Visual Studio Code workspace is the collection of one or more folders that are opened in a VS Code window (instance).
The concept of a workspace enables VS Code to:
Configure settings that only apply to a specific folder or folders but not others.
Persist task and debugger launch configurations that are only valid in the context of that workspace.
Store and restore UI state associated with that workspace (for example, the files that are opened).
Selectively enable or disable extensions only for that workspace.
Making a VS Code Workspace
The easiest way to open a workspace is using the File menu and selecting one of the available folder entries for opening. Alternatively if you launch VS Code from a terminal, you can pass the path to a folder as the first argument to the code command for opening.
Python Environments
An environment in Python is the context in which a Python program runs and consists of an interpreter and any number of installed packages.
Global environments
By default, any Python interpreter installed runs in its own global environment. If you run python at a new terminal, you are running the interpreter's global environment. Any packages that you install or uninstall affect the global environment and all programs that you run within it.
Local Environments
There are two types of environments that you can create for your workspace: virtual and conda environments. Both types of environment allow you to install packages without affecting other environments. This lets you isolate what packages you install for your workspace so that they don't interfere with your needs in another workspace.
Virtual Environment
A virtual environment is a built-in way to create an environment to isolate the packages you install per workspace. A virtual environment creates a folder that contains a copy (or symlink) to a specific interpreter. When you install packages into a virtual environment it will end up in this new folder so that they are not interspersed with other packages used or needed by other workspaces.
Conda Environment
A conda environment is a Python environment that's managed using the conda package manager. Whether to use a conda environment or a virtual one will depend on your packaging needs, what your team has standardized on, etc. Download and install Anaconda from here.
Last updated