conda Verified current stable Not installed? Package Management

Conda / Set Configuration Value

Set Configuration Value

Set a specific conda configuration value.

$
Terminal
conda config --set <key> <value>

When To Use

When updating channel settings or environment variables in preparing for production deployment.

Pro Tip

Use the `--file` option to apply configuration changes from a file for bulk updates.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
conda config --set <key> <value>

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
Current Conda Configurations     
-------------------------------------
key                     | value      
-------------------------------------
channel_priority        | strict     
auto_activate_base      | True       
-------------------------------------
Configuration updated successfully!

Anatomy of Output

Understanding the result

Configuration saved. Operation Result

Indicates a successful configuration change.

Key: channels | New Value: ['defaults'] Key-Value Change

Confirms the updated configuration option.

Restart conda to apply changes. Next Steps

Indicates the necessity of a restart.

Troubleshooting

Common pitfalls

CondaError: Invalid key specified: 'unknown_key'.

Solution: Confirm the specified key is valid within configuration options.

CondaError: Unable to set value on read-only key.

Solution: Check if the specified key is modifiable.

CondaError: Invalid value provided.

Solution: Verify that the value for the configuration option adheres to expected formats.

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.
<key>
key
The value supplied for key.
<value>
value
The value supplied for value.
--set
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run the command: conda config --set {{key}} {{value}}.

  2. Step 2

    Check the current configuration with: conda config --show.

  3. Step 3

    Verify the expected output includes the new key-value pair.

Alternative Approaches

Comparable commands in other tools

Alternative package management tools for the same job.