Run the commands and follow the instructions:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.shSelect yes when running conda init, which would append the following lines in ~/.bashrc:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/mnt/<storage_disk>/home/<username>/bin/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/mnt/<storage_disk>/home/<username>/bin/miniconda3/etc/profile.d/conda.sh" ]; then
. "/mnt/<storage_disk>/home/<username>/bin/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/mnt/<storage_disk>/home/<username>/bin/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<Relaunch shell to make it work:
bashIn terminal, it would add a prefix of (base),
to indicate that you are in the base env of conda.
Create conda env and (de)activate it:
conda create --name ai python
conda activate ai
conda deactivateTo use quick alias, add these lines to ~/.bash_aliases:
alias xa="conda activate ai"
alias xd="conda deactivate"conda update -n base -c defaults condaSee:
Add a package (such as pip) when create the env:
conda create --name my_env pipOr add below codes to .condarc:
create_default_packages:
- python
[Recommended]:
Use python in conda env:
(base) [path] $ python -m pip install -r requirements[Deprecated]:
conda install <package>
conda install -c conda-forge <package>
conda install -c conda-forge --file requirements.txtReferences:
- New Bing
- installation - PackagesNotFoundError: The following packages are not available from current channels: - Stack Overflow