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
Spike - Can we use conda list and conda info all the info we need to work with conda #6882
Currently when we discover interpreter environments we walk through a list of locators. For conda we have CondaEnvService and CondaEnvFileService (in that order). CondaEnvService uses the conda command and CondaEnvFileService uses the .conda/environments.txt file. So this spike boils down to "can be get rid of CondaEnvFileService?"
Getting environments from mini conda does not work
This could be a bigger problem. (possible it fails with vanilla installs of latest version of Conda) TODO:
Need to test current extension on Windows, Mac and Linux.
Latest anaconda
Latest mini conda
Test discovery of conda environments (ensure they are listed in environment list)
Try to find a better way e.g. conda run (check upstream on Conda repo for recommendations)
We need to identify a better (proper way) to get this working
(adding paths, etc is a hack and we're trying to get away from such hacks when dealing with Conda).
changed the title [-]Getting environments from mini conda does not work[/-][+]Spike - Does `conda info` work on a vanilla install of Conda[/+]on Aug 14, 2019
changed the title [-]Spike - Does `conda info` work on a vanilla install of Conda[/-][+]Spike - Can we use `conda list` and `conda info` all the info we need to work with conda[/+]on Oct 9, 2019
Running conda info --all --json returns a JSON object that has a envs field. This value matches the contents of the ~/.conda/environments.txt
Some background info for Karthik Nadig (@karthiknadig).
Note: In the past conda info didn't return everything (at all).
Thats why the extension checked both places. Later PTVS too started doing the same thing.
So the question is, has conda fixed this and can we rely purely on conda info. If so, do this do this based on a version check?
The real trick is the conda version which is updated independently of Anaconda releases. And we have been planning to support at least conda 4.6 and newer due to relying on conda run going forward.
Activity
[-]Getting environments from mini conda does not work[/-][+]Spike - Does `conda info` work on a vanilla install of Conda[/+][-]Spike - Does `conda info` work on a vanilla install of Conda[/-][+]Spike - Can we use `conda list` and `conda info` all the info we need to work with conda[/+]DonJayamanne commentedon Oct 22, 2019
Brett Cannon (@brettcannon) Karthik Nadig (@karthiknadig) Sorry, didn't manage to get to this (i.e. didn't investigate)
6 remaining items
karthiknadig commentedon Nov 19, 2019
On Windows:
Running
conda info --all --jsonreturns a JSON object that has aenvsfield. This value matches the contents of the~/.conda/environments.txtenvironments.txt
conda info --all --json
DonJayamanne commentedon Nov 20, 2019
Some background info for Karthik Nadig (@karthiknadig).
Note: In the past
conda infodidn't return everything (at all).Thats why the extension checked both places. Later PTVS too started doing the same thing.
So the question is, has
condafixed this and can we rely purely onconda info. If so, do this do this based on a version check?karthiknadig commentedon Nov 20, 2019
Don Jayamanne (@DonJayamanne) Luciana Abud (@luabud) How far back in terms of anaconda versions are we supporting?
DonJayamanne commentedon Nov 20, 2019
We need to check what versions are used by our users to make this decision.
karthiknadig commentedon Nov 20, 2019
I looked up to a year back Anaconda3-5.3.0 released on September 27 2018.
conda infogets the environments correctly.brettcannon commentedon Nov 20, 2019
The real trick is the conda version which is updated independently of Anaconda releases. And we have been planning to support at least conda 4.6 and newer due to relying on
conda rungoing forward.karthiknadig commentedon Nov 21, 2019
So
Anaconda3-5.3.0usesconda 4.5.11. Since i can get environments onconda 4.5.11usingconda infoi think we are are good there.karthiknadig commentedon Nov 26, 2019
On linux, tested from latest to

Anaconda3-5.3.1which usesconda 4.4.10. I am able to access environment data usingconda list.And via

conda info:If the minimum version we are planning to support is
conda 4.6*then I think we can safely get rid ofCondaEnvFileService.