Activate environment with "source" or "conda"?

閲覧: 0 回
最初の未読メッセージにスキップ

Tom Loredo

未読、
2018/03/19 18:44:352018/03/19
To: conda - Public
Hi conda experts-

I've been puzzled about this for a while.  Sometimes, when I create a new conda env, I get the following instructions for activation:

To activate this environment, use:
> source activate py27env

To deactivate an active environment, use:
> source deactivate

Other times I get:

To activate this environment, use
 $ conda activate py36env

To deactivate an active environment, use
 $ conda deactivate

Note the use of "conda" instead of "source" (these examples also used two different Python versions).

The docs indicate that "source" is right:


That's what I've always used. Some students I teach (we use conda/anaconda in my course) instead use "conda" and seem to have no problem.

Is there a difference? Is there a reason the "conda create" command sometimes tells me to use "source" vs. "conda" for activation?

-Tom

Michael Sarahan

未読、
2018/03/19 19:17:392018/03/19
To: Tom Loredo、conda - Public
conda 4.4 added the new option.  Both should still work.  The new option is nice because it finally unifies the commands necessary between Windows and Linux/Mac.  It also removes the conflict with virtualenv, which also depended on a script named "activate."  It does require some setup, though, and I'm not sure exactly what the status on docs for that is.  I'd say give it a try - if it doesn't work, please file an issue on the conda github issue tracker and ask for the docs to be updated.

--
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+un...@continuum.io.
To post to this group, send email to co...@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/71f85ff1-e87e-4026-8878-301607d3fb56%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Wilfred Tyler Gee

未読、
2018/09/14 22:43:432018/09/14
To: conda - Public、lor...@astro.cornell.edu
The docs here are out of date and confusing. Any indication about when this change will make it into the docs? I'm left confused as to which way I should setup and activate environment.

Cheers!
全員に返信
投稿者に返信
転送
新着メール 0 件