Python2

About
Python is a programming language that lets you work more quickly and integrate your systems more effectively.
Python2 is deprecated since December 31, 2019.
Installation
Change enable from False to True in the python2 section (cf module installation).
For more details read the official documentation.
Requirements
No requirements.
VSCode
Additionnal informations
Please read the environment documentation.
By default, the Python extension looks for and loads a file named .env in the current workspace folder, then applies those definitions. The file is identified by the default entry "python.envFile": "${workspaceFolder}/.env.
And you can also interact with your environment with the VSCode settings .vscode/settings.json:
python.envFile: Absolute path to a file containing environment variable definitionspython.venvPath: Path to the folder with a list of Virtual Environmentspython.venvFolders: Folders in your home directory to look into for virtual environments (supports pyenv, direnv and virtualenvwrapper by default)
And also use environment variable (you can set these variables directly in your python.envFile:
WORKON_HOME: used byvirtualenvwrapperandpipenvPYTHONPATH: specifies additional locations where the Python interpreter should look for modules
virtualenv
If you want to test directly your virtualenv without configuring your settings:
After that, you must select a Python interpreter. Press F1 and type:

And select the right interpreter (virtualenv) from the list provided.
pipenv
If you want to test directly your pipenv without configuring your settings:
After that, you must select a Python interpreter. Press F1 and type:
And select the right interpreter from the list provided.
poetry
If you want to test directly your poetry without configuring your settings:
After that, you must select a Python interpreter. Press F1 and type:
And select the right interpreter from the list provided.
anaconda
Please read the specific settings at the bottom of the page.
VSCode extensions
ms-python.python
This extension provides a rich support for the Python language (for all actively supported versions of the language: 2.7, >=3.5), including features such as IntelliSense, linting, debugging, code navigation, code formatting, Jupyter notebook support, refactoring, variable explorer, test explorer, snippets, and more!

VisualStudioExptTeam.vscodeintellicode
This extension provides AI-assisted development features for Python.

ms-python.vscode-pylance
Pylance is an extension that works alongside Python in Visual Studio Code to provide performant language support. Under the hood, Pylance is powered by Pyright, Microsoft's static type checking tool. Using Pyright, Pylance has the ability to supercharge your Python IntelliSense experience with rich type information, helping you write better code faster.
kevinrose.vsc-python-indent
This extension corrects Python indentation in Visual Studio Code.

littlefoxteam.vscode-python-test-adapter
This extension allows you to run your Python Unittest or Pytest.

VSCode settings
Global settings
Windows settings
If anaconda is set to True:
If anaconda is set to False:
If profile is set to windows_portable:
Linux Settings
If anaconda is set to True:
If anaconda is set to False:
VSCode keybindings
No keybindings.
Software
Windows software
scoop
anaconda2 (will be installed if
anacondais set totrue)
msys2
The following packages will be installed only if the profile is set to windows_portable profile:
Linux software
brew
anaconda2 (custom brew formulae only if
anacondais set toTrue)
nix
Documentation
VSCode-Anywhere
Environment
Windows environment
If anaconda is set to True:
Linux environment
If anaconda is set to True:
Specific settings
anaconda
Allow to install anaconda:
Please read:
This is a recommended method for the data sciences and with the use of Jupyter.

anaconda_update
Update all anaconda modules:
pip
Allow installing packages with pip.
pkgs: name of the packages to installenabled:Truetoenable,Falseto skip (default toFalse)version: the version of the pip package
opts
opts is not mandatory but allows to pass additional arguments.
Extra args can be arguments described in the Saltstack pip states or can be global Saltstack arguments.
Global opts packages settings:
pip:pkgs:opts:global: allow passing arguments to all pip packages when installing, updating, or uninstalling a packagepm:pkgs:opts:install: allow passing arguments to all pip packages when installing a package (cf states.pip.installed)pip:pkgs:opts:update: allow passing arguments to all pip packages when updating a package (cf states.pip.installed)pip:pkgs:opts:uninstall: allow passing arguments to all pip packages when uninstalling a package (cf states.pip.removed)
Specific opts packages settings:
pip:<mypkg>:opts:global: allow passing arguments to<mypkg>pip package when installing, updating, or uninstalling the packagepip:pkgs:<mypkg>:opts:install: allow passing arguments to<mypkg>pip packages when installing the package (cf states.pip.installed)pip:pkgs:<mypkg>:opts:update: allow passing arguments to<mypkg>pip packages when updating the package (cf states.pip.installed)pip:pkgs:<mypkg>:opts:uninstall: allow passing arguments to all pip packages when uninstalling a package (cf states.pip.removed)
global:
Windows:
If anaconda is set to True:
If anaconda is set to False:
If the profile is set to windows_portable:
Linux:
If anaconda is set to True:
If anaconda is set to False:
Last updated
Was this helpful?