Discussion:
Creating environments programmatically
d***@public.gmane.org
2014-07-14 14:36:45 UTC
Permalink
I'm looking at the new benchmarking tool asv, presented by Michael
Droettboom at SciPy 2014. It uses virtualenv to create testing
environments. This does not play well with conda. I'd like to extend asv to
create conda environments instead of virtualenv ones.

Is it possible to create (and activate) conda environments programmatically?

Thanks,
Dan
--
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+unsubscribe-aihBOO89d3I0eCyII+***@public.gmane.org
To post to this group, send email to conda-aihBOO89d3I0eCyII+***@public.gmane.org
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Ilan Schnell
2014-07-14 14:58:13 UTC
Permalink
Hello Dan,
yes absolutely. You use the 'conda create' command to create a conda
environment, and then 'source activate'.

- Ilan
Post by d***@public.gmane.org
I'm looking at the new benchmarking tool asv, presented by Michael
Droettboom at SciPy 2014. It uses virtualenv to create testing
environments. This does not play well with conda. I'd like to extend asv to
create conda environments instead of virtualenv ones.
Is it possible to create (and activate) conda environments
programmatically?
Thanks,
Dan
--
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 http://groups.google.com/a/continuum.io/group/conda/.
--
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+unsubscribe-aihBOO89d3I0eCyII+***@public.gmane.org
To post to this group, send email to conda-aihBOO89d3I0eCyII+***@public.gmane.org
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
d***@public.gmane.org
2014-07-14 14:59:42 UTC
Permalink
Thanks Ilan. I'm asking whether I can run those commands from Python
without resorting to os.system(...) or opening a subprocess.
Post by Ilan Schnell
Hello Dan,
yes absolutely. You use the 'conda create' command to create a conda
environment, and then 'source activate'.
- Ilan
Post by d***@public.gmane.org
I'm looking at the new benchmarking tool asv, presented by Michael
Droettboom at SciPy 2014. It uses virtualenv to create testing
environments. This does not play well with conda. I'd like to extend asv to
create conda environments instead of virtualenv ones.
Is it possible to create (and activate) conda environments
programmatically?
Thanks,
Dan
--
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 http://groups.google.com/a/continuum.io/group/conda/.
--
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+unsubscribe-aihBOO89d3I0eCyII+***@public.gmane.org
To post to this group, send email to conda-aihBOO89d3I0eCyII+***@public.gmane.org
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Ilan Schnell
2014-07-14 15:14:25 UTC
Permalink
Even though conda provides an API on the Python level, I would strongly
recommend running conda in a subprocess. You may also take a look at the
conda-api project, which basically provides a subprocess interface to
conda: https://github.com/conda/conda-api
Post by d***@public.gmane.org
Thanks Ilan. I'm asking whether I can run those commands from Python
without resorting to os.system(...) or opening a subprocess.
Post by Ilan Schnell
Hello Dan,
yes absolutely. You use the 'conda create' command to create a conda
environment, and then 'source activate'.
- Ilan
Post by d***@public.gmane.org
I'm looking at the new benchmarking tool asv, presented by Michael
Droettboom at SciPy 2014. It uses virtualenv to create testing
environments. This does not play well with conda. I'd like to extend asv to
create conda environments instead of virtualenv ones.
Is it possible to create (and activate) conda environments
programmatically?
Thanks,
Dan
--
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
Visit this group at http://groups.google.com/a/continuum.io/group/conda/
.
--
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 http://groups.google.com/a/continuum.io/group/conda/.
--
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+unsubscribe-aihBOO89d3I0eCyII+***@public.gmane.org
To post to this group, send email to conda-aihBOO89d3I0eCyII+***@public.gmane.org
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
d***@public.gmane.org
2014-07-14 15:16:44 UTC
Permalink
Conda-api looks like what I have in mind. Would you strongly recommend
against that too? Can you explain why?
Post by Ilan Schnell
Even though conda provides an API on the Python level, I would strongly
recommend running conda in a subprocess. You may also take a look at the
conda-api project, which basically provides a subprocess interface to
conda: https://github.com/conda/conda-api
Post by d***@public.gmane.org
Thanks Ilan. I'm asking whether I can run those commands from Python
without resorting to os.system(...) or opening a subprocess.
Post by Ilan Schnell
Hello Dan,
yes absolutely. You use the 'conda create' command to create a conda
environment, and then 'source activate'.
- Ilan
Post by d***@public.gmane.org
I'm looking at the new benchmarking tool asv, presented by Michael
Droettboom at SciPy 2014. It uses virtualenv to create testing
environments. This does not play well with conda. I'd like to extend asv to
create conda environments instead of virtualenv ones.
Is it possible to create (and activate) conda environments
programmatically?
Thanks,
Dan
--
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
Visit this group at http://groups.google.com/a/
continuum.io/group/conda/.
--
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 http://groups.google.com/a/continuum.io/group/conda/.
--
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+unsubscribe-aihBOO89d3I0eCyII+***@public.gmane.org
To post to this group, send email to conda-aihBOO89d3I0eCyII+***@public.gmane.org
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Ilan Schnell
2014-07-14 15:20:58 UTC
Permalink
I *DO* recommend using conda-api. The advantage is also that you can use
it from any environment, not just the root environment.
Post by d***@public.gmane.org
Conda-api looks like what I have in mind. Would you strongly recommend
against that too? Can you explain why?
Post by Ilan Schnell
Even though conda provides an API on the Python level, I would strongly
recommend running conda in a subprocess. You may also take a look at the
conda-api project, which basically provides a subprocess interface to
conda: https://github.com/conda/conda-api
Post by d***@public.gmane.org
Thanks Ilan. I'm asking whether I can run those commands from Python
without resorting to os.system(...) or opening a subprocess.
Post by Ilan Schnell
Hello Dan,
yes absolutely. You use the 'conda create' command to create a conda
environment, and then 'source activate'.
- Ilan
Post by d***@public.gmane.org
I'm looking at the new benchmarking tool asv, presented by Michael
Droettboom at SciPy 2014. It uses virtualenv to create testing
environments. This does not play well with conda. I'd like to extend asv to
create conda environments instead of virtualenv ones.
Is it possible to create (and activate) conda environments
programmatically?
Thanks,
Dan
--
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
Visit this group at http://groups.google.com/a/con
tinuum.io/group/conda/.
--
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
Visit this group at http://groups.google.com/a/continuum.io/group/conda/
.
--
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 http://groups.google.com/a/continuum.io/group/conda/.
--
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+unsubscribe-aihBOO89d3I0eCyII+***@public.gmane.org
To post to this group, send email to conda-aihBOO89d3I0eCyII+***@public.gmane.org
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Dan Allan
2014-07-14 16:00:03 UTC
Permalink
Will I need a bleeding-edge version of conda to support --path?

conda_api.CondaError: conda create --yes --quiet --path env/py2.7
python=2.7: usage: conda [-h] [-V] command ...
conda: error: unrecognized arguments: --path
Post by Ilan Schnell
I *DO* recommend using conda-api. The advantage is also that you can use
it from any environment, not just the root environment.
Post by d***@public.gmane.org
Conda-api looks like what I have in mind. Would you strongly recommend
against that too? Can you explain why?
Post by Ilan Schnell
Even though conda provides an API on the Python level, I would strongly
recommend running conda in a subprocess. You may also take a look at the
conda-api project, which basically provides a subprocess interface to
conda: https://github.com/conda/conda-api
Post by d***@public.gmane.org
Thanks Ilan. I'm asking whether I can run those commands from Python
without resorting to os.system(...) or opening a subprocess.
Post by Ilan Schnell
Hello Dan,
yes absolutely. You use the 'conda create' command to create a conda
environment, and then 'source activate'.
- Ilan
Post by d***@public.gmane.org
I'm looking at the new benchmarking tool asv, presented by Michael
Droettboom at SciPy 2014. It uses virtualenv to create testing
environments. This does not play well with conda. I'd like to extend asv to
create conda environments instead of virtualenv ones.
Is it possible to create (and activate) conda environments programmatically?
Thanks,
Dan
--
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,
Visit this group at http://groups.google.com/a/con
tinuum.io/group/conda/.
--
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
Visit this group at http://groups.google.com/a/
continuum.io/group/conda/.
--
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 http://groups.google.com/a/continuum.io/group/conda/.
--
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+unsubscribe-aihBOO89d3I0eCyII+***@public.gmane.org
To post to this group, send email to conda-aihBOO89d3I0eCyII+***@public.gmane.org
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Ilan Schnell
2014-07-14 16:12:20 UTC
Permalink
This is a bug in the conda-api. It should be --prefix, the conda option
has always been called 'prefix'.
Post by Dan Allan
Will I need a bleeding-edge version of conda to support --path?
conda_api.CondaError: conda create --yes --quiet --path env/py2.7
python=2.7: usage: conda [-h] [-V] command ...
conda: error: unrecognized arguments: --path
Post by Ilan Schnell
I *DO* recommend using conda-api. The advantage is also that you can use
it from any environment, not just the root environment.
Post by d***@public.gmane.org
Conda-api looks like what I have in mind. Would you strongly recommend
against that too? Can you explain why?
Post by Ilan Schnell
Even though conda provides an API on the Python level, I would strongly
recommend running conda in a subprocess. You may also take a look at the
conda-api project, which basically provides a subprocess interface to
conda: https://github.com/conda/conda-api
Post by d***@public.gmane.org
Thanks Ilan. I'm asking whether I can run those commands from Python
without resorting to os.system(...) or opening a subprocess.
Post by Ilan Schnell
Hello Dan,
yes absolutely. You use the 'conda create' command to create a conda
environment, and then 'source activate'.
- Ilan
Post by d***@public.gmane.org
I'm looking at the new benchmarking tool asv, presented by Michael
Droettboom at SciPy 2014. It uses virtualenv to create testing
environments. This does not play well with conda. I'd like to extend asv to
create conda environments instead of virtualenv ones.
Is it possible to create (and activate) conda environments programmatically?
Thanks,
Dan
--
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,
Visit this group at http://groups.google.com/a/con
tinuum.io/group/conda/.
--
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
Visit this group at http://groups.google.com/a/
continuum.io/group/conda/.
--
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
Visit this group at http://groups.google.com/a/continuum.io/group/conda/
.
--
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+unsubscribe-aihBOO89d3I0eCyII+***@public.gmane.org
To post to this group, send email to conda-aihBOO89d3I0eCyII+***@public.gmane.org
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Ilan Schnell
2014-07-14 16:15:15 UTC
Permalink
I just fixed the problem in conda-api master.
Post by Ilan Schnell
This is a bug in the conda-api. It should be --prefix, the conda option
has always been called 'prefix'.
Post by Dan Allan
Will I need a bleeding-edge version of conda to support --path?
conda_api.CondaError: conda create --yes --quiet --path env/py2.7
python=2.7: usage: conda [-h] [-V] command ...
conda: error: unrecognized arguments: --path
Post by Ilan Schnell
I *DO* recommend using conda-api. The advantage is also that you can
use it from any environment, not just the root environment.
Post by d***@public.gmane.org
Conda-api looks like what I have in mind. Would you strongly recommend
against that too? Can you explain why?
Post by Ilan Schnell
Even though conda provides an API on the Python level, I would
strongly recommend running conda in a subprocess. You may also take a look
at the conda-api project, which basically provides a subprocess interface
to conda: https://github.com/conda/conda-api
Post by d***@public.gmane.org
Thanks Ilan. I'm asking whether I can run those commands from Python
without resorting to os.system(...) or opening a subprocess.
Post by Ilan Schnell
Hello Dan,
yes absolutely. You use the 'conda create' command to create a
conda environment, and then 'source activate'.
- Ilan
Post by d***@public.gmane.org
I'm looking at the new benchmarking tool asv, presented by
Michael Droettboom at SciPy 2014. It uses virtualenv to create testing
environments. This does not play well with conda. I'd like to extend asv to
create conda environments instead of virtualenv ones.
Is it possible to create (and activate) conda environments programmatically?
Thanks,
Dan
--
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,
Visit this group at http://groups.google.com/a/con
tinuum.io/group/conda/.
--
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,
Visit this group at http://groups.google.com/a/
continuum.io/group/conda/.
--
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
Visit this group at
http://groups.google.com/a/continuum.io/group/conda/.
--
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+unsubscribe-aihBOO89d3I0eCyII+***@public.gmane.org
To post to this group, send email to conda-aihBOO89d3I0eCyII+***@public.gmane.org
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Dan Allan
2014-07-14 18:37:28 UTC
Permalink
It's working well. Thank you.
Post by Ilan Schnell
I just fixed the problem in conda-api master.
Post by Ilan Schnell
This is a bug in the conda-api. It should be --prefix, the conda option
has always been called 'prefix'.
Post by Dan Allan
Will I need a bleeding-edge version of conda to support --path?
conda_api.CondaError: conda create --yes --quiet --path env/py2.7
python=2.7: usage: conda [-h] [-V] command ...
conda: error: unrecognized arguments: --path
Post by Ilan Schnell
I *DO* recommend using conda-api. The advantage is also that you can
use it from any environment, not just the root environment.
Post by d***@public.gmane.org
Conda-api looks like what I have in mind. Would you strongly recommend
against that too? Can you explain why?
Post by Ilan Schnell
Even though conda provides an API on the Python level, I would
strongly recommend running conda in a subprocess. You may also take a look
at the conda-api project, which basically provides a subprocess interface
to conda: https://github.com/conda/conda-api
Post by d***@public.gmane.org
Thanks Ilan. I'm asking whether I can run those commands from Python
without resorting to os.system(...) or opening a subprocess.
Post by Ilan Schnell
Hello Dan,
yes absolutely. You use the 'conda create' command to create a
conda environment, and then 'source activate'.
- Ilan
Post by d***@public.gmane.org
I'm looking at the new benchmarking tool asv, presented by
Michael Droettboom at SciPy 2014. It uses virtualenv to create testing
environments. This does not play well with conda. I'd like to extend asv to
create conda environments instead of virtualenv ones.
Is it possible to create (and activate) conda environments
programmatically?
Thanks,
Dan
--
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,
Visit this group at http://groups.google.com/a/con
tinuum.io/group/conda/.
--
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,
Visit this group at http://groups.google.com/a/
continuum.io/group/conda/.
--
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
Visit this group at
http://groups.google.com/a/continuum.io/group/conda/.
--
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+unsubscribe-aihBOO89d3I0eCyII+***@public.gmane.org
To post to this group, send email to conda-aihBOO89d3I0eCyII+***@public.gmane.org
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Aaron Meurer
2014-07-15 15:42:43 UTC
Permalink
Two points worth making for conda environments:

- "creating" an environment is nothing more than mkdir. You can just
take an existing directory and install into it.

- You do not need to activate an environment to use it. All that does
is put the environment's bin/ in the front of your PATH, but
programmatically, it would probably be better to just use the absolute
to the environment's python.

Aaron Meurer
Post by Dan Allan
It's working well. Thank you.
Post by Ilan Schnell
I just fixed the problem in conda-api master.
Post by Ilan Schnell
This is a bug in the conda-api. It should be --prefix, the conda option
has always been called 'prefix'.
Post by Dan Allan
Will I need a bleeding-edge version of conda to support --path?
conda_api.CondaError: conda create --yes --quiet --path env/py2.7
python=2.7: usage: conda [-h] [-V] command ...
conda: error: unrecognized arguments: --path
Post by Ilan Schnell
I *DO* recommend using conda-api. The advantage is also that you can
use it from any environment, not just the root environment.
Post by d***@public.gmane.org
Conda-api looks like what I have in mind. Would you strongly recommend
against that too? Can you explain why?
Post by Ilan Schnell
Even though conda provides an API on the Python level, I would
strongly recommend running conda in a subprocess. You may also take a look
at the conda-api project, which basically provides a subprocess interface to
conda: https://github.com/conda/conda-api
Post by d***@public.gmane.org
Thanks Ilan. I'm asking whether I can run those commands from Python
without resorting to os.system(...) or opening a subprocess.
Post by Ilan Schnell
Hello Dan,
yes absolutely. You use the 'conda create' command to create a
conda environment, and then 'source activate'.
- Ilan
Post by d***@public.gmane.org
I'm looking at the new benchmarking tool asv, presented by Michael
Droettboom at SciPy 2014. It uses virtualenv to create testing environments.
This does not play well with conda. I'd like to extend asv to create conda
environments instead of virtualenv ones.
Is it possible to create (and activate) conda environments
programmatically?
Thanks,
Dan
--
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,
Visit this group at
http://groups.google.com/a/continuum.io/group/conda/.
--
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,
Visit this group at
http://groups.google.com/a/continuum.io/group/conda/.
--
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
Visit this group at
http://groups.google.com/a/continuum.io/group/conda/.
--
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 http://groups.google.com/a/continuum.io/group/conda/.
--
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+unsubscribe-aihBOO89d3I0eCyII+***@public.gmane.org
To post to this group, send email to conda-aihBOO89d3I0eCyII+***@public.gmane.org
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Loading...