I am trying to migrate my environment to a new machine that does not have internet access using the Anaconda command “conda pack.” However, the command returns that the environment was not found
I am using windows
env list
$ conda env list
# conda environments:
#
base C:\User
comando conda pack
$ conda pack -n base
Collecting packages...
CondaPackError: Environment name 'base' doesn't exist
Do you have any ideas on how to make the command work?
conda-pack
is not intended for baseThe base environment is special and doesn't live in the envs/
folder, where conda pack
is going to look for an environment to package. Generally, you should not be working with base as an environment for redeployment.1 Instead, create a new environment with the packages you wish to bundle and use conda pack
on that.
constructor
for custom base installersIf you want to create an installer that doesn't assume a base installation and will instead create one, then this should be done with Conda's constructor
tool. This is what Miniforge uses to bundle its custom Conda deployments and provides additional control over configuration settings, not just package installation.
[1]: The conda-pack
tool assumes that an existing Conda installation is present, i.e., there should already be a base on the target system. Hence, it wouldn't make sense to deploy a new "base" to the system - either overwriting the existing one, or creating an new environment with conda
installed. One should only have conda
installed in base.