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
Set the interpreter for the project set to the newly-created environment.
Not sure if this is common enough to warrant implementing, though. Would this be useful in a teaching environment with heterogeneous OSs where people might mess up one of these steps? Or in that instance do we just say "use a shell script" if they are all on the same kind of system or "just explain what you're doing" when it's a mixed set of OSs?
changed the title [-]Also run pip/conda as appropriate based on requirements.txt/environment.yml file existing in the workspace[/-][+]Provide a "Create environment" command[/+]on Apr 5, 2018
Activity
DonJayamanne commentedon Nov 14, 2017
From Brett Cannon (@brettcannon) on September 20, 2017 20:42
So here is my thought of what a "create environment" command could do ...
conda create –name $ENV –yes –file environment.ymlactivate $ENVsource activate $ENVvirtualenv --python $PYTHON $ENVpython3 –m venv $ENVpip install –upgrade –r $REQUIREMENTSIOW, simplify the following down to a command with at most 2 prompts (environment name and requirements/environment file):
$ python3 –m venv env $ source env/bin/activate $ pip install –r requirements.txtNot sure if this is common enough to warrant implementing, though. Would this be useful in a teaching environment with heterogeneous OSs where people might mess up one of these steps? Or in that instance do we just say "use a shell script" if they are all on the same kind of system or "just explain what you're doing" when it's a mixed set of OSs?
jmagosta commentedon Nov 22, 2017
brettcannon commentedon Nov 22, 2017
[-]Also run pip/conda as appropriate based on requirements.txt/environment.yml file existing in the workspace[/-][+]Provide a "Create environment" command[/+]4 remaining items
mcarans commentedon Dec 17, 2018
I suggest 2 additional features:
luabud commentedon Nov 22, 2022
This has been released a couple of months ago: https://devblogs.microsoft.com/python/python-in-visual-studio-code-october-2022-release/#simplified-project-setup-with-new-create-environment-command