I also got very frustrated with this yesterday when I came across this
message on an Ubuntu system when running conda activate:
CommandNotFoundError: Your shell has not been properly configured to use
'conda activate'.
If your shell is Bash or a Bourne variant, enable conda for the current
user with
$ echo ". /home/XXXXXXX/anaconda3/etc/profile.d/conda.sh" >> ~/.bashrc
or, for all users, enable conda with
$ sudo ln -s /home/XXXXXXX/anaconda3/etc/profile.d/conda.sh
/etc/profile.d/conda.sh
The options above will permanently enable the 'conda' command, but they do
NOT
put conda's base (root) environment on PATH. To do so, run
$ conda activate
in your terminal, or to put the base environment on PATH permanently, run
$ echo "conda activate" >> ~/.bashrc
Previous to conda 4.4, the recommended way to activate conda was to modify
PATH in
your ~/.bashrc file. You should manually remove the line that looks like
export PATH="/home/XXXXXXX/anaconda3/bin:$PATH"
^^^ The above line should NO LONGER be in your ~/.bashrc file! ^^^
After trying to get my head around it, I think this is the final message
conda is trying to get across:
- source activate is being left for virtualenv to use - conda is going
to move to using conda activate for everything
- conda no longer wants the generic anaconda3/bin in your path - so you
should always activate the environment you want to use (even if it is just
base)
I'm not sure what the Anaconda (or miniconda) installer will put into your
bashrc file, but my guess is that you should have something like this:
. /home/XXXXXXX/anaconda3/etc/profile.d/conda.sh
conda activate
This will ensure that the *base *environment is activated when you launch
your shell and also setup conda activate so that you can switch
environments. You should not need source activate for anything going
forward.
But, this is all my working theory. Maybe someone can confirm it.
Cheers,
Paul
On Thu, 6 Sep 2018 at 07:19 'Chris Barker' via conda - Public <
Post by 'Chris Barker' via conda - PublicOK,
So things are in flux.
But what is the recommended way to activate an environment for someone
starting out today. I.e. downloading Anaconda of mjniconda today for the
first time.
Thanks,
-CHB
Post by Ariel BalterMy problem is--where are the docs on this? These differences and changes
are poorly advertised. This was discussed in some issue I participated in
somewhere...but I can't find it.
Conda 4.4 introduced a ["recommended change"](
https://conda.io/docs/release-notes.html#id24), but there is no
indication of how long the "old" way will be maintained. The docs do give
[a brief explanation](
https://conda.io/docs/release-notes.html#new-feature-highlights)
However, the [release notes](
https://conda.io/docs/release-notes.html#new-feature-highlights) at the
.io website are only up to 4.4.10.
The `conda initialize` change is discussed in the [repository changelog](
https://github.com/conda/conda/blob/master/CHANGELOG.md#460-unreleased),
and since it is unreleased, I can't assign fault for not having
documentation on it. I could look at the issues raised.
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE
<https://maps.google.com/?q=7600+Sand+Point+Way+NE&entry=gmail&source=g>
(206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
--
You received this message because you are subscribed to the Google Groups
"conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/conda/CALGmxE%2BfxjFufGOZ71MWr-cUAd3dGh7sg0oPUBbc0TWfzTt7fQ%40mail.gmail.com
<https://groups.google.com/a/continuum.io/d/msgid/conda/CALGmxE%2BfxjFufGOZ71MWr-cUAd3dGh7sg0oPUBbc0TWfzTt7fQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/CAFtj-tr9aNXnnPckUHVW-HZCuReih_RK7rf8J110ijtGXrqNXw%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.