4

I have anaconda distribution installed on a computer without connection to the internet.

i have created a new environment and activated it using the following commands:

conda install -p c:\python\test_env --offline

and then

conda activate c:\python\test_env

Could you please instruct me how to install into this new environment the following items,

including their dependencies,

all from (base) environment:

python

jupyter lab

pandas

Rafael Zanzoori
  • 531
  • 1
  • 7
  • 23
  • 1
    Does this answer your question? [Cloning root environment with Anaconda](https://stackoverflow.com/questions/30291733/cloning-root-environment-with-anaconda) – luigigi Nov 28 '19 at 10:50

2 Answers2

9

Clone it (but first delete test_env to start fresh):

conda create --name test_env --clone base

This'll carry over all libraries, packages, and their dependencies - without affecting base.

OverLordGoldDragon
  • 1
  • 9
  • 53
  • 101
  • 2
    What if I don't want to clone all packages? What if I created new environment and wnt to add only 1 specific package from base? I don't want to recreate my env, because I already install a lot of additional packages from another sources. – Mikhail_Sam Nov 29 '19 at 10:02
  • @Mikhail_Sam Then copy/paste only that package from base and run `conda update --all` to ensure compatibility (or don't, but risks package conflicts) – OverLordGoldDragon Nov 29 '19 at 15:02
  • 2
    I found one more (maybe easier) solution: https://stackoverflow.com/questions/59102511/clone-some-packages-from-base-env-to-another-one – Mikhail_Sam Nov 29 '19 at 15:32
-1

Try this command to avoid confusion

conda install -c conda-forge

the above command will install the packages in the system irrespective of the environment.

You can add packages listed in environment.yml file to an existing environment by using the following command

conda env update -n conda-env -f /path/to/environment.yml