conda Verified current stable Not installed? Package Management

Conda / Deactivate Conda Environment

Deactivate Conda Environment

Deactivate a Conda environment using the deactivate command.

$
Terminal
conda deactivate

When To Use

When switching to a base or another Conda environment.

Pro Tip

Utilize 'conda info' to check which environment is currently active.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
(base) user@machine:~$ conda deactivate

# Now in base environment
(base) user@machine:~$

Anatomy of Output

Understanding the result

deactivated base environment Status Message

Confirms deactivation of the environment.

Current Environment: base Current Environment Status

Shows the active environment prior to deactivation.

Use 'conda activate <env>' to switch. Next Steps

Informs user of the next possible commands.

Power User Variants

Optimized versions

conda deactivate --all

Deactivate all active conda environments.

conda deactivate <env_name>

Deactivate a specific environment.

Troubleshooting

Common pitfalls

Environment 'myenv' not found

Solution: Confirm the environment name with 'conda env list'.

Could not deactivate environment

Solution: Check if you are already in the base environment.

Command 'conda deactivate' not found

Solution: Ensure conda is correctly installed and initialized.

Command Breakdown

What each part is doing

conda
Base Command
The executable that performs this operation. Here it runs Conda before the shell applies any redirect operators.

How To Run

Execution path

  1. Step 1

    Run the command: `conda deactivate` to exit the current conda environment.

  2. Step 2

    Verify the result: Check your prompt to ensure you're now in the base environment.

Alternative Approaches

Comparable commands in other tools

Alternative package management tools for the same job.