You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate the possible flow for a Create Environment command #19676
We show a Quick pick allowing users to select from one of the providers (venv / conda / etc)
For venv :
Select a workspace in multi root scenario. If single workspace this is not shown.
Select a python from a list of global pythons (This required exposing the python picker as an internal API). If only one interpreter is found, then that is used.
Initiate the command to create venv. Install any packages.
For conda:
Select a workspace in multi root scenario. If single workspace this is not shown.
Select a version of python to install in the new environment.
Initiate the command to create conda env using --prefix.
Once env is created you will see a pop-up to select that env (this is temporary until we expose a way to pause that UI)
Activity
brettcannon commentedon Aug 11, 2022
flowchart TD start([start]) has_interpreter{Interpreter selected?} has_env_selected{Environment selected?} has_python{Is Python installed?} select_newest[Select newest Python] has_venv{Has `venv`?} create_env[`python -m venv .venv`] has_pip{"Has `pip`?"} has_requirements{Has requirements files?} select_requirements[/Select requirements files/] install_requirements["`python -m pip install -r requirements.txt`"] has_pyproject{Has a `pyproject.toml`?} select_extras[/Select extras/] install_extras["`python -m pip install -e .[extras]`"] error((Notify user of problem)) finished([end]) start --> has_interpreter subgraph Create Environment has_interpreter -- yes --> has_venv has_interpreter -- no --> has_env_selected %% error has_env_selected -- "no (nothing selected)" --> has_python has_python -- yes --> select_newest %% error select_newest --> has_venv has_venv -- yes --> create_env %% error end subgraph Installation create_env --> has_pip has_pip -- yes --> has_requirements %% error has_requirements -- yes --> select_requirements select_requirements --> install_requirements %% finished has_requirements -- no --> has_pyproject has_pyproject -- yes --> select_extras select_extras --> install_extras %% finished end has_venv -- "no (Debian)" --> error has_python -- no --> error has_env_selected -- yes --> error has_pip -- "no (Debian)" --> error error --> finished install_extras --> finished has_pyproject -- no --> finished install_requirements --> finishedbrettcannon commentedon Aug 11, 2022
Asked for feedback at https://twitter.com/brettsky/status/1557850636611268609 .
karthiknadig commentedon Aug 12, 2022
If we are triggering environment creataion, we should probably skip the popup that we show when we detect env creation.
brettcannon commentedon Aug 15, 2022
We should probably skip it regardless and just select the environment with an option to turn off automatic environment detection/selection.
karthiknadig commentedon Sep 16, 2022
For now the flow is like this:
venv/conda/ etc)venv:conda:--prefix.Create environment using `venv` or `conda` (#19848)
brettcannon commentedon Sep 27, 2022
Which install scenarios are supported?
karthiknadig commentedon Sep 27, 2022
requirements.txtorpyproject.tomldirectly under the workspace directory is supported.Create environment using `venv` or `conda` (microsoft#19848)
Create environment using `venv` or `conda` (microsoft/vscode-python#1…