How do I use an existing environment on a new computer?

I recently changed computers and copied all of my Conda projects over to the new computer. However, Conda on my new machine does not appear to have the dependencies required and I’m not sure how to install them. In a regular Python project I’d expect to see a requirements.txt, what is the Conda equivalent?

Hello,

If you still have access to the old computer you can export the old conda environment and all the packages, then import them on the new computer and recreate the same environment:

On old computer:
Activate your environment:

1). conda activate
2). export environment:
conda env export > environment.yml

3). Import environment on new computer:
conda env create -f environment.yml

Hi sweller, thanks for getting back to me. Unfortunately I don’t have the old computer.

I’m a little confused as to why the old environment won’t just work on the new computer - aren’t Conda environments effectively standalone Python instances?

Hello,

I probably should have asked for more information from you on your original post.
Do you get the dependencies error on the new computer when you install a specific package?
If so what package are you attempting to install?

You can see the list of dependencies for a specific conda package by running this command:

conda search --info

I want to install every package needed to run that same environment on a machine that has never run that environment before.

conda search --info looks like we’re getting somewhere but there are hundreds of results which overspilled the buffer of the terminal, often duplicates of the same package
e.g.

xlwt 1.3.0 py39haa95532_0
-------------------------
xlwt 1.3.0 py38_0
-----------------
xlwt 1.3.0 py37_0
-----------------

and also the information for each package is quite verbose

xlwt 1.3.0 py37_0
-----------------
file name   : xlwt-1.3.0-py37_0.conda
name        : xlwt
version     : 1.3.0
build       : py37_0
build number: 0
size        : 158 KB
license     : BSD
subdir      : win-64
url         : https://repo.anaconda.com/pkgs/main/win-64/xlwt-1.3.0-py37_0.conda
md5         : 86221c44d013ada1f82b7f791a5a91fc
timestamp   : 2018-08-04 22:41:23 UTC
dependencies:
  - python >=3.7,<3.8.0a0

Essentially I just need a list of all the package name required so that I can then just do conda install x y z and then be up and running