Support > About cybersecurity > This section describes how to configure anaconda environment variables in linux
This section describes how to configure anaconda environment variables in linux
Time : 2024-12-23 14:32:35
Edit : Jtti

To configure the anaconda environment variable in Linux, set the PATH environment variable so that you can access anaconda and its managed Python environment from anywhere. The general steps to configure anaconda environment variables are as follows!

anacondade is usually installed in the /home/usernam/anaconda directory. Check the exact installation path of anaconda. If the bash shell configuration file is used, it is usually in bashrc, located in the user's home directory:

nano ~/.bashrc

If you use another shell such as zsh, the configuration file may be located in.zshrc. Open the end of the configuration file and add the following line:

export PATH="/home/ user name /anaconda3/bin:$PATH"

Replace /home/username/anaconda3 with your actual Anaconda installation path. If you are using the nano editor, you can press Ctrl + X, then Y to confirm that you have saved your changes, and finally Enter to exit.

To make the changes take effect immediately, reload the configuration file with the following command:

source ~/.bashrc

Or (for zsh users) :

source ~/.zshrc

Check the path environment variable by running the following command on the terminal:

echo $PATH

If the path to anaconda was added correctly, you should see it in the output. To ensure that all anaconda managed environments are properly identified:

conda init

The above command automatically configures environment variables based on shell type.

Linux box To view all installed anaconda environments, run the conda command to activate anaconda:

conda activate

If using anaconda 2020.11 or later:

conda init

Restart the terminal so that commands are automatically added to the shell. Once anaconda is activated, you can also use the following command to list all installation environments:

conda env list

Or use:

conda info --envs

The above command displays all created environments, such as system environments and other created custom environments. If you want to see other environment-specific information:

conda info -e

The above command displays a list of all environments, including each environment path and activity status.

Relevant contents

NFS server and client installation manual for the RHEL system Linux Essential Command set Gain insight into your hardware Create a compressed file and extract it to a specified file in Linux Overview of server data center cabinet dimensions and specifications Stop and disable unnecessary services in the Linux system Manage user/group and file permissions/properties and sudo access in Linux Linux converts files to UTF-8 encoding This section describes how the Lynis tool performs security assessment on a Linux system
Go back

24/7/365 support.We work when you work

Support