This script (Anaconda | venv) allows the user make a choice between virtual environments for anaconda or python venv by the time they start a terminal window
For this, the user must include this script to the end of .bashrc file in your Ubuntu (the one operation system that has been tested).
Following the steps:
- open the
.bashrcfile with:sudo nano ~/.bashrc CTRL + Endto go to the end of file- Copy and paste the script at the end of file and make the changes according to their user
CTRL + Xto be asked to save the file- Click
Yto confirm
Then, in your terminal window, type the command:
source .bashrcto update or close and open a terminal window again.
In case you use Anaconda, it must be installed too.
The Script will read the environments that are defined and will include a new one in case it finds one.
Next, it show the options to user, who will make their choice.
OBS: In case the terminal is an vscode terminal integrated, the script will select the interpreter python that user defined as default or will deliver the default prompt if not.