User Tools

Site Tools


conda

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
conda [2024/06/06 08:23] jansenconda [2025/10/01 08:18] (current) jansen
Line 8: Line 8:
 ===== Installing Anaconda ===== ===== Installing Anaconda =====
 ==== Method 1: Use the provided version ==== ==== Method 1: Use the provided version ====
-All our desktops and compute nodes currently have conda pre-installed, so you can skip the downlaod step, and with this version, the ''init'' step below can also be skipped. So if you choose this easiest solution. proceed to creating your environments (or tweaking the setup through config commands)+All our desktops and compute nodes currently have conda pre-installed, so you can skip the download step, and with this version, the ''init'' step below can also be skipped. So if you choose this easiest solution. proceed to creating your environments (or tweaking the setup through config commands)
  
 ==== Method 2: Download and install ==== ==== Method 2: Download and install ====
Line 23: Line 23:
 Now that you have the ''conda'' package manager available, you can use it to complete the setup.  Now that you have the ''conda'' package manager available, you can use it to complete the setup. 
 One bit of setup that ''conda'' insists on, is to add some initialization code to the login environment, so conda will always be active (''conda init bash'' or ''conda init tcsh''). However, see "pitfalls" section below. One bit of setup that ''conda'' insists on, is to add some initialization code to the login environment, so conda will always be active (''conda init bash'' or ''conda init tcsh''). However, see "pitfalls" section below.
 +
 +Note that with the system default version of conda, this init step is not necessary!
  
 Other bits of setup can be done through the ''conda config''  commands, see ''conda config --help'' for details. It is also possible to edit the ''$HOME/.condarc'' directly if you know what settings you want (eg by looking them up online). Other bits of setup can be done through the ''conda config''  commands, see ''conda config --help'' for details. It is also possible to edit the ''$HOME/.condarc'' directly if you know what settings you want (eg by looking them up online).
Line 47: Line 49:
  
 ==== Solutions to these pitfalls ==== ==== Solutions to these pitfalls ====
 +First of all, no workarounds are needed if you use the system-provided version of ''conda'', everything has been taken care of in this case. So once again, if you can use the system version of conda, please do. It makes life so much easier on you (and on the computer group).
 +
 +--- 
 +
 +When using a miniconda or anaconda from an environment module, or one you downloaded and installed yourself, here are some possible workarounds to the ''conda init'' issues:
 +
 For the ''bash'' shell, the simplest workaround is not activating conda in your ''.bashrc'' but activating it through For the ''bash'' shell, the simplest workaround is not activating conda in your ''.bashrc'' but activating it through
  
Line 73: Line 81:
 Disadvantage: if you occasionally use another desktop, you will not see your environments. In that case, use ''/net/computername/data2'' in stead of ''/data2''. in the configuration. Disadvantage: if you occasionally use another desktop, you will not see your environments. In that case, use ''/net/computername/data2'' in stead of ''/data2''. in the configuration.
  
 +If you are making this change when you already have some conda environments (in $HOME/.conda), you can move them to the new location. And just to be sure, in case there are already hard-coded path names in the environment, make a symbolic link. So, using the example .condarc shown above:
 +  mv .conda /data2/yourname/conda
 +  ln -s /data2/yourname/conda ~/.conda
 +  
conda.1717662225.txt.gz · Last modified: by jansen