Discussion:
[conda] "source activate"?
'Chris Barker' via conda - Public
2018-09-05 09:15:06 UTC
Permalink
Is "source activate" still the recommended way to activate an environment,
as in the docs:

https://conda.io/docs/user-guide/tasks/manage-environments.html#activating-an-environment

I thought there as a new way to do it with recent conda that's more
X-platform:

conda activate maybe??

-CHB
--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

***@noaa.gov
--
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/CALGmxELX%3DzAf4xAMruThiDdV5%3Dei9O_MaciVBQRVYMaZv4MZRg%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Ariel Balter
2018-09-05 13:44:33 UTC
Permalink
My 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.
--
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/ca31b813-30aa-4d35-ad14-6ebe219df8ad%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
'Chris Barker' via conda - Public
2018-09-05 19:18:59 UTC
Permalink
OK,

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 Balter
My 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 (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

***@noaa.gov
--
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/CALGmxE%2BfxjFufGOZ71MWr-cUAd3dGh7sg0oPUBbc0TWfzTt7fQ%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Paul Freeman
2018-09-05 21:48:59 UTC
Permalink
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 - Public
OK,
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 Balter
My 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.
Ariel Balter
2018-09-05 21:58:02 UTC
Permalink
So, the upshot is that they are creating a new command

conda init


that will take care of setting up your installation properly

https://github.com/conda/conda/issues/6507#issuecomment-418744698
--
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/7dc2566a-2320-49ca-9fb0-eae605a413f8%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Loading...