Why do I run source /home/luyx/bin/activate directly when VSCODE creates a terminal?

eddiekyo 注册会员
2023-01-25 12:11

This is the virtual environment in which vscode loads python
TIPS: vscode needs to activate the virtual environment every time it is used

dongxiaoyi1985 注册会员
2023-01-25 12:11

Please accept: because your VSCODE configuration file is set to run this command to activate the virtual environment.
Displays "(luyx)" in VSCODE terminal because the name of the virtual environment you activated is "luyx" and it will be displayed in the terminal prompt.
If you want to remove this prompt, you can change the value of the PS1 variable in your configuration file.