Jun's Blog

Output, activities, memo and etc.

Install Miniconda3 on Fedora

Install Miniconda referring the Miniconda and Installing in silient mode.

Install

/home/root/local/miniconda3-py38-4.8.3 is installed directory in my case.

$ wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.8.3-Linux-x86_64.sh
$ sudo mkdir /home/root/local/miniconda3-py38-4.8.3
$ sudo chown jaruga:jaruga /home/root/local/miniconda3-py38-4.8.3

The installer script's options are like this. As I created the installing directory above, -u option is needed.

  • -b: batch mote.
  • -u: update
  • -p: prefix
$ bash Miniconda3-py38_4.8.3-Linux-x86_64.sh -b -u -p /home/root/local/miniconda3-py38-4.8.3
...
installation finished.

The following is the log to enable conda on the shell section like virtualenv, to enable conda setting as init. But as I do not want to modify .bashrc for that, I recommend NOT to run the following step. It's just for my note.

$ eval "$(/home/root/local/miniconda3-py38-4.8.3/bin/conda shell.bash hook)"

(base) $ command -v conda
conda

(base) $ conda init
modified      /home/jaruga/.bashrc

(base) $ conda config --set auto_activate_base false

Then add conda's bin directory to PATH with lower priority after the standard bin directories like this. Because I just want to use conda command, using specific python command set.

$ vi ~/.bashrc
...
PATH="${PATH}:/home/root/local/miniconda3-py38-4.8.3/bin"
...
export PATH

$ source ~/.bashrc
$ which conda
/home/root/local/miniconda3-py38-4.8.3/bin/conda

$ which python3
/usr/bin/python3

$ which python
/usr/bin/python

conda command

It's like this.

$ conda install -c bioconda -y mafft
$ conda install -c genomedk -y raxml-ng
$ conda list
# packages in environment at /home/root/local/miniconda3-py38-4.8.3:
#
# Name                    Version                   Build  Channel
...
mafft                     7.467                h516909a_0    bioconda
...
raxml-ng                  0.6.0                         0    genomedk
...

$ command -v mafft
/home/root/local/miniconda3-py38-4.8.3/bin/mafft

$ command -v raxml-ng
/home/root/local/miniconda3-py38-4.8.3/bin/raxml-ng