Skip to content

python: Fix conda environment not auto-activated in remote terminal#50895

Merged
Veykril merged 2 commits intozed-industries:mainfrom
lingyaochu:python_conda_remote
Mar 6, 2026
Merged

python: Fix conda environment not auto-activated in remote terminal#50895
Veykril merged 2 commits intozed-industries:mainfrom
lingyaochu:python_conda_remote

Conversation

@lingyaochu
Copy link
Copy Markdown
Contributor

Closes #50619

In the conda activation script building procedure, Zed currently performs a file check for the conda executable on the client side. When in remote development, this check always fails because the file exists on the remote host, not the local machine. Since pet already handles existence checks, removing this redundant check allows the activation to proceed. It is also better to let any potential issues (like permissions) show up in the terminal rather than silently skipping the activation.

This addresses the root cause for remote development, which is different from the approach in #50715 that focuses on shell hooks.

The video recording

recording.mp4

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

Release Notes:

  • Fixed conda environment not auto-activating in the terminal during remote development sessions.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 6, 2026
@github-actions github-actions bot added the community champion Issues filed by our amazing community champions! 🫶 label Mar 6, 2026
@SomeoneToIgnore
Copy link
Copy Markdown
Contributor

Previous: #50715

@lingyaochu
Copy link
Copy Markdown
Contributor Author

Yeah, checked that already, metioned here in this PR description

This addresses the root cause for remote development, which is different from the approach in #50715 that focuses on shell hooks.

Copy link
Copy Markdown
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

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

Thanks!

@Veykril Veykril enabled auto-merge (squash) March 6, 2026 07:40
@Veykril Veykril merged commit a70c295 into zed-industries:main Mar 6, 2026
30 checks passed
dapovoa pushed a commit to dapovoa/zed that referenced this pull request Mar 7, 2026
…ed-industries#50895)

Closes zed-industries#50619

In the conda activation script building procedure, Zed currently
performs a file check for the conda executable on the client side. When
in remote development, this check always fails because the file exists
on the remote host, not the local machine. Since `pet` already handles
existence checks, removing this redundant check allows the activation to
proceed. It is also better to let any potential issues (like
permissions) show up in the terminal rather than silently skipping the
activation.

This addresses the root cause for remote development, which is different
from the approach in zed-industries#50715 that focuses on shell hooks.

**The video recording**


https://github.com/user-attachments/assets/62967351-e3c5-4814-aec4-b2332940e7e3

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed conda environment not auto-activating in the terminal during
remote development sessions.
@lingyaochu lingyaochu deleted the python_conda_remote branch March 12, 2026 07:24
@zelenenka zelenenka added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement community champion Issues filed by our amazing community champions! 🫶 guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conda Python environment not activated, nor changeable via Zed UI

4 participants