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

Problems with new VSCode setting to remember Python interpreter for project #3251

Closed
tplobo opened this issue May 6, 2024 · 2 comments
Closed

Comments

@tplobo
Copy link

tplobo commented May 6, 2024

Describe the bug

In my understanding one of the latest updates from VSCode made the "Python Interpreter" setting to be remembered and automatically retrieved when the project is opened.

The first issue: this has modified some environment variables in terminals running in the bluemira environment, for example $HOST="x86_64-apple-darwin13...", instead of being equal to the output of hostname. This is apparently a known issue with conda.

As a potential fix, I have tried to set a .vscode/.zshenv to enforce the proper value for HOST. But this is overwritten by the activation of the mamba environment, that happens after sourcing .zshenv.

The second issue: to remedy that situation, I have set a .../activate.d/fix_host.sh file as a mamba post-activation script. However, due to this new VSCode setting for the Pythonf Interpreter, the mamba environment is apparently never properly activated, so the post-activation scripts are never run. In fact:

(bluemira) ... > mamba deactivate
Run 'mamba init' to be able to run mamba activate/deactivate
and start a new shell session. Or use conda to activate/deactivate.

and

(bluemira) ... > conda deactivate
CondaError: Run 'conda init' before 'conda deactivate'

so it looks like conda/mamba init are skipped.

I have opened an issue for VSCode.

Steps to reproduce

See above.

Environment

  • OS: macOS 14.4.1
  • Branch: (any)
@tplobo tplobo added the bug label May 6, 2024
@je-cook
Copy link
Contributor

je-cook commented May 7, 2024

we are not vscode therefore not for our issue tracker. We also have no files associated with setting up vscode in the repo. Thats not for us to maintain.

@je-cook je-cook closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
@tplobo
Copy link
Author

tplobo commented May 7, 2024

A temporary solution given by the developers of Python extension for VSCode.

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

No branches or pull requests

2 participants