-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow user to set their own custom activation commands for the interpreter #8870
Comments
@karrtikr @karthiknadig Please see comments in #8770 (comment) I agree with you about I believe only seasoned users would go into VS Code settings to customize the activation commands. Other would probably give up and just activate manually or file issues or even worse.. |
Yes we should definitely fix it. We should do our best in sending the correct default commands. But having support for custom activation command also seems like a nice workaround to have for the user. There're things we can do for discoverability. For eg. we can test if an activation failed for a user and notify them of this option. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
+1 I also need to set some env variables (db name, db user and password) when opening a new terminal tab. I do it now by Waiting for this feature. Hope that this will help me to set env variables in the terminal, as well as do other shell commands (like change directory to |
+1 This would allow me to fix an issue that I've been having #13854, and would allow me to quickly and easily fix similar issues without building from source or waiting for a release. It also gives users more control over their setup. |
+1 Same for me with #14794, it would even allow to use Nix shell |
Is #12020 going to help? |
Came here from #9917. There are a lot of things VSCode doesn't do right, and activating a Python virtual environment by |
As a workaround for the virtualenvwrapper use case, the following rather hideous hack could be added to your premkvirtualenv hook:
Any virtual envs created with that will always call It's not nice, might not be posix compliant, and I can't speak for the security of it, but it does make the relevant hooks get run. Would be much nicer to get proper custom activation commands though! :-) |
Closing as we do not plan to implement this change in the Python extension. |
Upon creating a terminal, an activation command to activate the current environment is sent to the terminal.
There are often issues like #8770, where environment is not activated due to extension sending the wrong activation commands.
Example: An activation command used to work with conda
x.x.x
, but conday.y.y
changed something so it is no longer valid. And if the extension does not keep up with the change, activating the environment would fail.Allow user to set their own activation commands for the interpreter they're using. Often they know the correct activation commands as you can notice in #8770.
The text was updated successfully, but these errors were encountered: