Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »


Can I Install Miniconda3 Locally?

Yes. You can install miniconda3 (and other applications) yourself. There is nothing wrong or against policy with this.

If you do install it, please make sure you:

  • understand what you are doing.

  • how it affects your environment.

  • and track/record what you’ve done and why.

Since you are intentionally effecting your environment, you need to take a level of responsibility to mange and work with this.

 General Installation Process
[<username>@mblog2 ~]$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
[<username>@mblog2 ~]$ bash Miniconda3-latest-Linux-x86_64.sh
Welcome to Miniconda3 py312_24.7.1-0
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
...
Do you accept the license terms? [yes|no]
>>> yes

Miniconda3 will now be installed into this location:
/home/<username>/miniconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/<username>/miniconda3] >>>
PREFIX=/home/<username>/miniconda3
Unpacking payload ...
Installing base environment...
Downloading and Extracting Packages:
## Package Plan ##
  environment location: /home/<username>/miniconda3
...
installation finished.

Do you wish to update your shell profile to automatically initialize conda?
This will activate conda on startup and change the command prompt when activated.
If you'd prefer that conda's base environment not be activated on startup,
   run the following command when conda is activated:

conda config --set auto_activate_base false

You can undo this by running `conda init --reverse $SHELL`? [yes|no]
[no] >>> yes
no change     /home/<username>/miniconda3/condabin/conda
no change     /home/<username>/miniconda3/bin/conda
no change     /home/<username>/miniconda3/bin/conda-env
no change     /home/<username>/miniconda3/bin/activate
no change     /home/<username>/miniconda3/bin/deactivate
no change     /home/<username>/miniconda3/etc/profile.d/conda.sh
no change     /home/<username>/miniconda3/etc/fish/conf.d/conda.fish
no change     /home/<username>/miniconda3/shell/condabin/Conda.psm1
no change     /home/<username>/miniconda3/shell/condabin/conda-hook.ps1
no change     /home/<username>/miniconda3/lib/python3.12/site-packages/xontrib/conda.xsh
no change     /home/<username>/miniconda3/etc/profile.d/conda.csh
modified      /home/<username>/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

Thank you for installing Miniconda3!
[<username>@mblog2 ~]$

Should I Install Miniconda3 Locally?

Ask yourself “what does a local installation benefit me over using the provided miniconda3 module?

There might be reasons why you might need to install this yourself, just make sure you can communicate why, and that you understand what you are doing to your environment and take responsibility for this.

If you can not answer this, then use the version that ARCC provides as a module.

If you can answer this, please be prepared to answer the next question.


Why Did You Install Miniconda3?

If you ask ARCC a question related to conda environments and we see that you have installed miniconda3 yourself, the first question we will as is “why did you install this yourself?

If you can not answer this, then ARCC will suggest that your uninstall this and use the provide miniconda3 module.

We support this module and understand how it should be working and can typically resolve your issues.


How Do I Know if Miniconda3 Has Been Installed Locally?

You should notice that you command prompt has changed when you start a new session.

Notice the difference:

Not Installed:

[<username>@mblog2 ~]$

Installed:

(base) [<username>@mblog1 ~]$

Notice how the (base) miniconda3 environment is activated.

Also notice that your .bashrc file has been updated with something of the form:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/<username>/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/<username>/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/home/<username>/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/<username>/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

I Didn’t Install This?

Applications do not install themselves - there is a process that you would have followed. See the first question.


How Do I Remove My Local Installation?

Step 1: Edit your .bashrc script and remove everything between:

# >>> conda initialize >>>
...
# <<< conda initialize <<<

Step 2: Remove the miniconda3 folder from your home, or where ever you installed it.

(base) [salexan5@mblog1 ~]$ rm -rf miniconda3/

Step 3: On the start of your next session, the command prompt should return to normal:

[<username>@mblog2 ~]$

Job Submission Error

We can not guarantee that what ever conda environments you have activate on the login nodes will be inherited when you submit a job using sbatch.

You will errors of the form:

# Within Submission Script:
...
conda activate <path-to-conda-environment>
...

within the slurm output you will see:

...
CondaError: Run 'conda init' before 'conda activate'
...

ARCC Recommendation

ARCC recommends using the versions of miniconda3 provided as a module, and use a submission script of the form:

...
module purge
module load miniconda3/<version>
conda activate <path-to-conda-environment>
...

ARCC Related Conda Workshops

Before moving forward, ARCC has the following workshops

We would highly recommend working through at least the first one to understand how to use conda effectively.

  • No labels