-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide the prefix of a possibly activated conda environment in getExecutionDetails
API
#13044
Comments
Thanks! Title of issueMaybe I should have worded it like that and you may want to change the title of the current issue: „Provide the conda prefix in ExampleSomething like getExecutionDetails()["execCommand"] = [
"/path/to/conda/env/A/bin/python",
"/path/to/conda/env/B/bin/python",
"/path/to/system/python"
]
getExecutionDetails()["condaPrefix"] = [
"/path/to/conda/env/A",
"/path/to/conda/env/B",
null
] Use caseThere is a Code extension that maintains website favorites (many of them pointing Projects often work with different Python environments and Python package versions.
the URL to these Python package documentation websites must be adapted according to the currently selected Python To do so all website favorites are maintained in a template JSON file. Cut-out example: [
{
"fallback_url": "https://numpy.org/doc/stable/user",
"url": "https://numpy.org/doc/${MAJOR}.${MINOR}/user/",
"pkg_name": "numpy",
"title": "NumPy ${MAJOR}.${MINOR} (Documentation)"
},
{
"fallback_url": "https://pandas.pydata.org/pandas-docs/stable/",
"url": "https://pandas.pydata.org/pandas-docs/version/${MAJOR}.${MINOR}.${PATCH}/",
"pkg_name": "pandas",
"title": "pandas ${MAJOR}.${MINOR}.${PATCH} (Documentation)"
}
] The extension knows some For that call the interpreter from Here, the conda environment is not properly activated (env var The external Python tool needs to know the conda prefix of interest but is being run by some default conda interpreter. During runtime the tool can NOT check for The prefix is needed to request versions for all Python packages installed in that When the processing/ filling of placeholders is completed, the quick pick UI is being shown. That way, the developer can always and very quick choose to open an API reference for any Python I can imagine that this is just one out of multiple imaginable use cases. This is why I request that this additional information will be exposed by the API of the |
I had to rephrase (detail) the use case (see paragraph with bold text above). |
Thanks for the suggestion! We talked about it with the team and we have unfortunately decided we will not be moving forward with this idea. We think there isn't an enough widespread need for this to warrant the maintenance cost for the feature. |
Alright, thanks that this has been considered in discussions! |
Originally posted by @jamilraichouni in #12596 (comment)
Hi!
Would be great if
getExecutionDetails
were also providing the prefix of a possibly activated conda environment.That can be identified using the path from
execCommand
, but then everybody has to do that by his own doing something likeCONDA_PREFIX
is set and if not:conda
executable in the same path as the interpreter given inexecCommand
.I have a use case where I need to get the conda env prefix during runtime of a conda Python process even if the conda env has not been activated. If there is a more stable way to do that, let me know, please.
Cheers,
Jamil
The text was updated successfully, but these errors were encountered: