Discussion:
[conda] how to get conda environments to inherit root packages
Michael Sarahan
2016-12-22 17:41:10 UTC
Permalink
There is no (good) way to inherit packages. That's just likely to cause
more problems than it is worth.

The good news is that adding packages to environments that are already
installed in other environments (root env included) is practically free in
terms of hard disk space. Wherever possible, this is done with hard
linking, so files are not actually copied, and do not occupy extra disk
space.

My advice: install the other packages that you want to use into your new
environment.
I have installed conda and it includes numpy, scipy, etc.
I then establish a conda env via: conda create -n tensorflow python=3.5
I then activate that conda via: source activate tensorflow
This puts me into the "tensorflow" env.
In (tensorflow)..., I enter python3 and get
import numpy as np (or any other similar package)
if does not recognize numpy.
However it did allow me to import numpy in the root.
How do I get the conda env "tensorflow" to inherit all the packages (such
as numpy, prettytensor, scipy, etc) from the root into that environment?
Thanks, (conda noob)
--
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/19714d7d-4cf7-4b13-ba0f-
e98ed58edf8d%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/conda/19714d7d-4cf7-4b13-ba0f-e98ed58edf8d%40continuum.io?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/CAB9hrOq6kUEh%2B_QxL7wuczWJTFrkAY2QbRsdMm%2BMaS9cyVzUtw%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Ian Stokes Rees
2016-12-22 19:48:04 UTC
Permalink
I have installed conda and it includes numpy, scipy, etc.
I then establish a conda env via: conda create -n tensorflow
python=3.5
I think the question I would ask is “what are you trying to achieve with
your |tensorflow| Conda environment?”

If you’re trying to create a software sandbox that is “everything in
root + tensorflow” then you can do:

|conda create -n mytensorflow --clone root source activate mytensorflow
conda install tensorflow |

If you’re trying to create a “minimal” environment that supports
Tensorflow, then you should just do:

|conda create -n tensorflowminimal tensorflow python=3.5 source activate
tensorflowminimal |

If you’re trying to create “Anaconda + Tensorflow” then:

|conda create -n tensorflowanaconda tensorflow anaconda python=3.5 source
activate tensorflowanaconda |

Good luck and let us know if that gets you going or if you have more
questions.

Ian

​
--
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/77c99750-8a00-a924-7603-6e12f3b648f0%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Bradley Kreider
2016-12-22 20:06:27 UTC
Permalink
You can "copy" an environment, although I don't think you want that. I
think you want to declaratively define your environment and tell conda to
create it for you. I haven't tested it, but it would look something like
this:

conda create -n tensorflow --clone root


That would start you off with an environment that is a clone of your root
environment.

Bradley
I have installed conda and it includes numpy, scipy, etc.
I then establish a conda env via: conda create -n tensorflow python=3.5
I then activate that conda via: source activate tensorflow
This puts me into the "tensorflow" env.
In (tensorflow)..., I enter python3 and get
import numpy as np (or any other similar package)
if does not recognize numpy.
However it did allow me to import numpy in the root.
How do I get the conda env "tensorflow" to inherit all the packages (such
as numpy, prettytensor, scipy, etc) from the root into that environment?
Thanks, (conda noob)
--
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/80ef3ab4-ef20-4157-9265-35594d95e033%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
James Roberts
2018-01-19 07:25:30 UTC
Permalink
If adding packages that are already installed on other environments doesn't
double up on hard rive space, why did installing an explicitly py36
environment download *everything* when I already had python 3.6 installed
as root?
For my second laptop, can I just rename *root* as *py36*? Or does there
have to be a *root* for some reason?
--
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/54c846cb-3f39-4407-bee1-64c4a502f408%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
d***@gmail.com
2018-03-22 17:37:26 UTC
Permalink
Faced somewhat same situation. I wanted to copy some packages from root env
instead of downloading new version. This solved the problem,..

Conda install package-name --offline
I have installed conda and it includes numpy, scipy, etc.
I then establish a conda env via: conda create -n tensorflow python=3.5
I then activate that conda via: source activate tensorflow
This puts me into the "tensorflow" env.
In (tensorflow)..., I enter python3 and get
import numpy as np (or any other similar package)
if does not recognize numpy.
However it did allow me to import numpy in the root.
How do I get the conda env "tensorflow" to inherit all the packages (such
as numpy, prettytensor, scipy, etc) from the root into that environment?
Thanks, (conda noob)
--
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/4da858ae-25f3-4b41-bd32-ba0f5ffe7c06%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Loading...