Skip to content

Use environment variable to identify conda / mamba#14515

Merged
Carreau merged 4 commits intoipython:mainfrom
scw:use-conda-env-exe
Oct 1, 2024
Merged

Use environment variable to identify conda / mamba#14515
Carreau merged 4 commits intoipython:mainfrom
scw:use-conda-env-exe

Conversation

@scw
Copy link
Copy Markdown
Contributor

@scw scw commented Sep 12, 2024

Conda and mamba both set an environment variable which refers to the base environment's executable path, use that in preference to less reliable methods, but fall back on the other approaches if unable to locate the executable this way.

Additionally, change the search to look for the bare command name rather than the command within the top level of the active environment, I'm dubious this approach works with any current conda / mamba version which usually place their executable links in a condabin directory or elsewhere not at the same level as the Python executable.

I believe this will also address #14350, which I'm also seeing in a Windows context where the regex fails to parse and causes a traceback.

scw and others added 2 commits September 11, 2024 22:39
Conda and mamba both set an environment variable which refers to the
base environment's executable path, use that in preference to less
reliable methods, but fall back on the other approaches if unable to
locate the executable this way.

Additionally, change the search to look for the bare command name rather
than the command within the top level of the active environment, I'm
dubious this approach works with any current conda / mamba version which
usually place their executable links in a `condabin` directory or
elsewhere not at the same level as the Python executable.
@scw
Copy link
Copy Markdown
Contributor Author

scw commented Sep 13, 2024

I believe the test failures from this are related to #14505 rather than something specific to this code change

@Carreau Carreau added this to the 8.28 milestone Oct 1, 2024
@Carreau
Copy link
Copy Markdown
Member

Carreau commented Oct 1, 2024

Seam reasonable, thanks.

@Carreau Carreau merged commit d23bee0 into ipython:main Oct 1, 2024
@Carreau Carreau modified the milestone: 8.28 Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants