How to specify the directory when installing conda on L…
To install conda to a specified directory, follow these steps:
- Firstly, download the Anaconda installation package for Linux from the official Anaconda website.
- Install with the following command in the terminal: (assuming you install conda to the /path/to/conda directory)
- Install Anaconda3-xxxxx-Linux-x86_64.sh silently to the specified directory /path/to/conda.
- The file you downloaded is called Anaconda3-xxxxx-Linux-x86_64.sh, with the -b flag indicating a silent installation and the -p flag specifying the installation directory.
- After installation, add Conda to the environment variables. You can edit the .bashrc or .bash_profile file (located in the user’s home directory) and add the following content at the end of the file:
- Set the PATH variable to include “/path/to/conda/bin” at the beginning.
- Then use the following command to enable the environment variables:
- execute the .bashrc file in the current shell
- Now you can use the conda command in the terminal, for example:
- What is the current version of conda installed on your system?
- If you are able to successfully output the version information of conda, it means the installation was successful.
Please make sure to replace /path/to/conda in the above command with the actual directory path where you want to install.