Python3

About

Pythonarrow-up-right is a programming language that lets you work more quickly and integrate your systems more effectively.

Installation

Change enable from False to True in the python3 section (cf module installation).

circle-info

For more details read the official documentationarrow-up-right.

Requirements

No requirements.

VSCode

Additionnal informations

Please read the environment documentationarrow-up-right.

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 definitions

  • python.venvPath: Path to the folder with a list of Virtual Environments

  • python.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 by virtualenvwrapper and pipenv

  • PYTHONPATH: 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 the good 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 the good 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 the good 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 extensionarrow-up-right provides a rich support for the Python languagearrow-up-right (for all actively supported versionsarrow-up-right 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 extensionarrow-up-right provides AI-assisted development features for Python.

circle-info

With the windows_portable profile this extension will not be installed.

ms-python.vscode-pylance

Pylance is an extensionarrow-up-right that works alongside Python in Visual Studio Code to provide performant language support. Under the hood, Pylance is powered by Pyrightarrow-up-right, 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 extensionarrow-up-right corrects Python indentation in Visual Studio Code.

littlefoxteam.vscode-python-test-adapter

This extensionarrow-up-right allows you to run your Python Unittestarrow-up-right or Pytestarrow-up-right.

circle-info

VSCode-Anywhere installs python modules nose, pytest and configurepytestto the default test adapter. unittest is a builtin python module.

VSCode settings

Global settings

Windows settings

If anaconda is set to True:

circle-info

Assuming you have installed in the default directory C:\VSCode-Anywhere.

If anaconda is set to False:

circle-info

Assuming you have installed in the default directory C:\VSCode-Anywhere.

If profile is set to windows_portable:

circle-info

Assuming you have installed in the default directory C:\VSCode-Anywhere.

Linux Settings

If anaconda is set to True:

If anaconda is set to False:

circle-info

Assuming you have installed in the directory /home/myuser/VSCode-Anywhere.

VSCode keybindings

No keybindingsarrow-up-right.

Software

Windows software

scoop

msys2

The following packages will be installed only if the profile is set to windows_portable profile:

Linux software

brew

Documentation

VSCode-Anywhere

Environment

Windows environment

circle-info

Assuming you have installed in the default directory C:\VSCode-Anywhere.

If anaconda is set to True:

circle-info

Assuming you have installed in the default directory C:\VSCode-Anywhere.

Linux environment

circle-info

Assuming you have installed in the directory /home/myuser/VSCode-Anywhere.

If anaconda is set to True:

circle-info

Assuming you have installed in the directory /home/myuser/VSCode-Anywhere.

Specific settings

anaconda

Allow to install anacondaarrow-up-right:

Please read:

This is recommended method for the data sciences and with the use of Jupyterarrow-up-right.

anaconda_update

Update all anacondaarrow-up-right modules:

circle-info

Requires that anaconda be set to True.

pip

Allow installing packages with piparrow-up-right.

  • pkgs: name of the packages to install

    • enabled: True to enable, False to skip (default to False)

    • 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 statesarrow-up-right or can be global Saltstack argumentsarrow-up-right.

Global opts packages settings:

  • pip:pkgs:opts:global: allow passing arguments to all pip packages when installing, updating, or uninstalling a package

  • pm:pkgs:opts:install: allow passing arguments to all pip packages when installing a package (cf states.pip.installedarrow-up-right)

  • pip:pkgs:opts:update: allow passing arguments to all pip packages when updating a package (cf states.pip.installedarrow-up-right)

  • pip:pkgs:opts:uninstall: allow passing arguments to all pip packages when uninstalling a package (cf states.pip.removedarrow-up-right)

Specific opts packages settings:

  • pip:<mypkg>:opts:global: allow passing arguments to <mypkg> pip package when installing, updating, or uninstalling the package

  • pip:pkgs:<mypkg>:opts:install: allow passing arguments to <mypkg> pip packages when installing the package (cf states.pip.installedarrow-up-right)

  • pip:pkgs:<mypkg>:opts:update: allow passing arguments to <mypkg> pip packages when updating the package (cf states.pip.installedarrow-up-right)

  • pip:pkgs:<mypkg>:opts:uninstall: allow passing arguments to all pip packages when uninstalling a package (cf states.pip.removedarrow-up-right)

circle-info

Replace <mypkg> by the name of the package to install.

  • global:

  • Windows:

If anaconda is set to True:

circle-info

Assuming you have installed in the default directory C:\VSCode-Anywhere.

If anaconda is set to False:

circle-info

Assuming you have installed in the default directory C:\VSCode-Anywhere.

If profile is set to windows_portable:

circle-info

Assuming you have installed in the default directory C:\VSCode-Anywhere.

  • Linux:

If anaconda is set to True:

circle-info

Assuming you have installed in the directory /home/myuser/VSCode-Anywhere.

If anaconda is set to False:

Last updated