Skip to content

python.terminal.activateEnvInCurrentTerminal Runs activate.csh in a zsh Terminal #16320

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

Closed
bphunter1972 opened this issue May 25, 2021 · 2 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@bphunter1972
Copy link

Environment data

  • VS Code version: Version: 1.56.2
  • Extension version (available under the Extensions sidebar): Python v2021.5.842923320
  • OS and version: OS X 11.3.1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.9
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): poetry created
  • Relevant/affected Python packages and their versions: XXX
  • Relevant/affected Python-related VS Code extensions and their versions: none
  • Value of the python.languageServer setting: Default

Expected behaviour

I've set my default terminal to zsh. When opening a Terminal, it should source the activate script, but instead sources activate.csh. Not sure how to fix this.

Actual behaviour

source /home/user/.cache/pypoetry/virtualenvs/seg-tools-LLLex4Df-py3.6/bin/activate.csh
▶ source /home/user/.cache/pypoetry/virtualenvs/seg-tools-LLLex4Df-py3.6/bin/activate.csh
/home/user/.cache/pypoetry/virtualenvs/seg-tools-LLLex4Df-py3.6/bin/activate.csh:11: command not found: deactivate
/home/user/.cache/pypoetry/virtualenvs/seg-tools-LLLex4Df-py3.6/bin/activate.csh:13: command not found: setenv
/home/user/.cache/pypoetry/virtualenvs/seg-tools-LLLex4Df-py3.6/bin/activate.csh:16: command not found: setenv
/home/user/.cache/pypoetry/virtualenvs/seg-tools-LLLex4Df-py3.6/bin/activate.csh:32: parse error near `else'

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Create a virtual env in a poetry project, v1.1.6. It should create files such as activate, activate.csh, activate.fish, activate.xsh, etc.
  2. Set workspace's Python to that virtualenv's bin/python3 file.
  3. Set terminal's default shell to zsh, (or others).
  4. Start a new shell.
@bphunter1972 bphunter1972 added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels May 25, 2021
@karrtikr
Copy link

Closing in favor of #16175. Please have a look at that. Fix should be available in VSCode insiders #16175 (comment)

@bphunter1972
Copy link
Author

Excellent! I'll wait for the stable release.

@karthiknadig karthiknadig removed the triage-needed Needs assignment to the proper sub-team label Jun 2, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants