How to configure Anaconda environment variables on Linu…
To set up the Anaconda environment variable in Linux, you can achieve this by editing the .bashrc or .bash_profile file. Below are the specific steps:
- Open the terminal and use a text editor to open the .bashrc file or .bash_profile file. You can use one of the following commands:
- Open the .bashrc file in the home directory.
- Open the .bash_profile file in the home directory.
- Append the following content to the end of the file, where /path/to/anaconda is the installation path for Anaconda.
- Add the Anaconda bin directory to the PATH.
- Save the file and exit the editor.
- Run the following command in the terminal to apply the configuration:
- Run the command “source ~/.bashrc”
- You can now use Anaconda in the terminal. You can use the following command to verify if the configuration is successful:
- What is the version of Conda?
If the configuration is successful, the version information of Anaconda will be displayed.
Note: If you are using the .bash_profile file instead of the .bashrc file, please run the following command in step 4.
source ~/.bash_profile