I installed Miniconda 3, then I tried to run python python -i
. Because python
didn't work.
the next warning appeared
Warning: This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see https://conda.io/activation
So, I went on to activate it, using source /c/Users/myUserName/Miniconda3/Scripts/activate base
, and ran python again, it worked well.
But each time I close the terminal and open it again, the same warning message appears, which has me to activate the environment again.
What am I missing?
If you want a command to be executed every time you open your terminal, you can add the command to the bottom of your ~/.bashrc
file.
A relatively easy way to do this uses the builtin nano
text-editor. From terminal, run
nano ~/.bashrc
and then scroll down to the bottom. The idea of adding your own stuff to the bottom is good practice, as you shouldn't really change the 'default' content generated by your OS unless you really know what you're doing.
Type in the command you want to execute every time terminal starts up which is
source /c/Users/myUserName/Miniconda3/Scripts/activate base
in your case. Then save with ctrl+o
then enter
. Then exit with ctrl+x
Now restart your terminal or run source ~/.bashrc
to see the effects.