Skip to content
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

PR: Add condabin directory, relative to sys.executable and provided pyexec, to paths searched for conda executable #21843

Merged
merged 3 commits into from
Mar 5, 2024

Conversation

mrclary
Copy link
Contributor

@mrclary mrclary commented Mar 1, 2024

Description of Changes

For the cases where conda environments are in non-standard locations, including possibly Spyder's runtime environment for conda installations, a conda executable may not be found.
This PR adds condabin directories, relative to Spyder's runtime executable and an optional Python executable, to the paths searched.

Optional extra search paths are added to is_program_installed.

Issue(s) Resolved

Part of #20357.

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct:

@ccordoba12
Copy link
Member

I think this is missing a test because it's an important functionality. For that I suggest to temporarily remove CONDA_EXE from os.environ and run find_conda(pyexec=sys.executable) to see if we're actually able to find it.

@ccordoba12 ccordoba12 changed the title PR: Add condabin, relative to sys.executable and provided pyexec, to paths searched for conda executable PR: Add condabin directory, relative to sys.executable and provided pyexec, to paths searched for conda executable Mar 3, 2024
@mrclary mrclary force-pushed the find_conda branch 2 times, most recently from 63cd240 to b781933 Compare March 4, 2024 17:23
@pep8speaks
Copy link

pep8speaks commented Mar 4, 2024

Hello @mrclary! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-03-05 15:41:05 UTC

mrclary added 2 commits March 4, 2024 09:26
…s searched for conda executable.

Add extra search paths for is_program_installed.
…e sure that a conda executable is still found.
@mrclary mrclary requested a review from ccordoba12 March 4, 2024 22:16
@mrclary mrclary marked this pull request as ready for review March 4, 2024 22:17
@ccordoba12
Copy link
Member

On the good news front, I'd like to make a quick comment to say that I tested the Linux installer from this PR and it solves the problem of dead consoles in it.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now, thanks @mrclary!

@ccordoba12 ccordoba12 changed the title PR: Add condabin directory, relative to sys.executable and provided pyexec, to paths searched for conda executable PR: Add condabin directory, relative to sys.executable and provided pyexec, to paths searched for conda executable Mar 5, 2024
@ccordoba12 ccordoba12 merged commit 7c4928a into spyder-ide:5.x Mar 5, 2024
23 checks passed
ccordoba12 added a commit that referenced this pull request Mar 5, 2024
@mrclary mrclary deleted the find_conda branch March 6, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants