{"id":10545,"date":"2025-07-10T16:11:41","date_gmt":"2025-07-10T20:11:41","guid":{"rendered":"https:\/\/labs.icahn.mssm.edu\/minervalab\/?page_id=10545"},"modified":"2026-04-13T13:24:35","modified_gmt":"2026-04-13T17:24:35","slug":"conda","status":"publish","type":"page","link":"https:\/\/labs.icahn.mssm.edu\/minervalab\/documentation\/conda\/","title":{"rendered":"Conda"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; fullwidth=&#8221;on&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_fullwidth_menu menu_id=&#8221;15&#8243; menu_style=&#8221;centered&#8221; fullwidth_menu=&#8221;on&#8221; active_link_color=&#8221;#d80b8c&#8221; dropdown_menu_line_color=&#8221;#221f72&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; menu_font=&#8221;|600|||||||&#8221; menu_text_color=&#8221;#FFFFFF&#8221; menu_font_size=&#8221;16px&#8221; background_color=&#8221;#221f72&#8243; background_layout=&#8221;dark&#8221; sticky_position=&#8221;top&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_fullwidth_menu][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;0px||0px||false|false&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; custom_padding=&#8221;||0px||false|false&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_text admin_label=&#8221;Breadcrumb&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<p><a href=\"https:\/\/labs.icahn.mssm.edu\/minervalab\/scientific-computing-and-data\/\">Scientific Computing and Data<\/a> \/ <a href=\"https:\/\/labs.icahn.mssm.edu\/minervalab\/\">High Performance Computing<\/a> \/ <a title=\"Documentation\" href=\"https:\/\/labs.icahn.mssm.edu\/minervalab\/documentation\/\">Documentation<\/a> \/ Conda<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; custom_margin=&#8221;|auto||90px||&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; module_alignment=&#8221;center&#8221; sticky_enabled=&#8221;0&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_text admin_label=&#8221;conda introduction&#8221; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; header_font=&#8221;|600|||||||&#8221; header_text_color=&#8221;#221f72&#8243; header_font_size=&#8221;26px&#8221; header_2_text_color=&#8221;#221f72&#8243; header_2_font_size=&#8221;24px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h1>Conda<\/h1>\n<h3><b><span style=\"color: #221f72\">Contents<\/span><\/b><br \/><a href=\"#usage\"><span style=\"color: #00aeef\">Usage<\/span><\/a><br \/><a href=\"#usepython\"><span style=\"color: #00aeef\">Using Conda with Python<\/span><\/a><br \/><a href=\"#user\"><span style=\"color: #00aeef\">Using Conda with R<\/span><\/a><\/h3>\n<p>Conda is an open-source package management system and environment management system that runs on Windows, macOS, Linux and z\/OS. Conda quickly installs, runs and updates packages and their dependencies. Conda easily creates, saves, loads and switches between environments on your local computer. It was created for Python programs, but it can package and distribute software for any language.<\/p>\n<p>Minerva has transitioned from Anaconda to <b data-path-to-node=\"3,0\" data-index-in-node=\"43\">Miniforge<\/b> to ensure a software ecosystem that is fully compliant and flexible. <strong>Please refrain from using the Anaconda channel for the reasons outlined below.<\/strong><\/p>\n<ul>\n<li><b>Licensing and Cost Compliance<\/b><br \/>Recent changes to Anaconda\u2019s licensing model restrict free usage in certain organizational and commercial settings. Miniforge is fully open-source and avoids potential licensing risks or fees.<\/li>\n<li><b>Open-Source Ecosystem (conda-forge)<\/b><br \/>Miniforge uses the conda-forge channel by default, which is community-maintained, transparent, and widely trusted for up-to-date packages.<\/li>\n<li><b>Lightweight and Minimal Installation<\/b><br \/>Unlike Anaconda, which ships with many preinstalled packages, Miniforge provides a minimal base environment. This reduces bloat and gives users full control over installed packages.<\/li>\n<\/ul>\n<p>The conda package and environment manager is included in all versions of miniforge3. Many versions of miniforge3 are available to use on Minerva. To see a list of installed versions of miniforge3 on the cluster, use Lmod\u2019s spider command:<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/scpublic.dmz.hpc.mssm.edu\/HPC\/conda\/miniforge.png&#8221; align=&#8221;center&#8221; admin_label=&#8221;ml spider anaconda image&#8221; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; width=&#8221;60%&#8221; max_width=&#8221;60%&#8221; module_alignment=&#8221;center&#8221; custom_margin=&#8221;10px||20px||false|false&#8221; custom_padding=&#8221;10px||20px||false|false&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_image][et_pb_text admin_label=&#8221;conda usage&#8221; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; header_font=&#8221;|600|||||||&#8221; header_text_color=&#8221;#221f72&#8243; header_font_size=&#8221;26px&#8221; header_2_text_color=&#8221;#221f72&#8243; header_2_font_size=&#8221;24px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2 id=\"usage\">Usage<\/h2>\n<p>When creating an environment, conda will download large amounts of installation tarballs to the package cache directory. The default is \u201c~\/.conda\/pkgs\u201d in \/home directory, however on Minerva, user&#8217;s home directory has 30 GB quota. Therefore, instead of using this default setting, it is recommended to redirect the downloaded package cache directory to a different location, which can be specified in the \u201c~\/.condarc\u201d file. Below steps listed steps for redirecting the package cache location:<\/p>\n<p>Edit conda user config file: \u201c~\/.condarc\u201d to redirect the package cache and env directory. For example, after opening \u201c~\/.condarc\u201d, add the following lines:<\/p>\n<blockquote>\n<pre><code>envs_dirs: \n- \/sc\/arion\/work\/your_username\/test-env\/envs \npkgs_dirs: \n- \/sc\/arion\/work\/your_username\/test-env\/pkgs<\/code><\/pre>\n<\/blockquote>\n<p>If you do not have a \u201c~\/.condarc\u201d file, use the command below to create one:<\/p>\n<pre><code>$ touch ~\/.condarc<\/code><\/pre>\n<p>Before trying to create a conda virtual environment, do a module purge to clean up the current environment:<\/p>\n<pre><code>$ module purge<\/code><\/pre>\n<p>Then load an miniforge3 module. For example:<\/p>\n<pre><code>$ module load miniforge3\/26.1.1-3<\/code><\/pre>\n<p>Check conda information. If conda is available, you will see:<\/p>\n<pre><code>$ conda info \n\u2026 \n     active environment :\n            shell level : 0\n       user config file : \/hpc\/users\/[user_name]\/.condarc\n populated config files : \/hpc\/packages\/minerva-rocky9\/miniforge3\/26.1.1-3\/miniforge\/.condarc\n                          \/hpc\/users\/[user_name]\/.condarc\n          conda version : 26.1.1\n    conda-build version : not installed\n         python version : 3.13.12.final.0\n                 solver : libmamba (default)\n       virtual packages : __archspec=1=sapphirerapids\n                          __conda=26.1.1=0\n                          __glibc=2.34=0\n                          __linux=5.14.0=0\n                          __unix=0=0\n... \n          package cache : \/hpc\/packages\/minerva-rocky9\/miniforge3\/26.1.1-3\/miniforge\/pkgs\n                          \/hpc\/users\/[user_name]\/.conda\/pkgs\n       envs directories : \/hpc\/packages\/minerva-rocky9\/miniforge3\/26.1.1-3\/miniforge\/envs\n                          \/hpc\/users\/[user_name]\/.conda\/envs\n    temporary directory : \/tmp\n               platform : linux-64\n...<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>Also make sure the envs and package cache directories have been redirected to the correct directory.<br \/>\nNext is to create a conda virtual environment. For example, creating a conda environment called &#8220;test&#8221; by:<\/p>\n<pre><code>$ conda create -n <strong>test<\/strong><\/code><\/pre>\n<p>The conda environment should then be activated before installing packages:<\/p>\n<pre><code>$ source activate <strong>test<\/strong><\/code><\/pre>\n<p>The name of the virtual environment will also show in front of your username in the prompt:<\/p>\n<pre><code>(<strong>test<\/strong>) [<strong>user_name<\/strong>@li04e03 ~]$<\/code><\/pre>\n<p>Then you can install packages using the command:<\/p>\n<pre><code>$ conda install <strong>-c channel_name<\/strong> package1=<strong>version<\/strong> package2=<strong>version<\/strong><\/code><\/pre>\n<p>Channel name and package version are optional.<br \/>\nIf you want to leave your virtual environment, simply run:<\/p>\n<pre><code>$ conda deactivate<\/code><\/pre>\n<p>Other useful conda commands:<br \/>\nChecking current and available conda environment:<\/p>\n<pre><code>$ conda info \u2013-envs<\/code><\/pre>\n<p>Check installed packages:<\/p>\n<pre><code>$ conda list<\/code><\/pre>\n<p>Upgrade and uninstall packages inside a conda environment:<\/p>\n<pre><code>$ conda upgrade\/update <strong>package1 package2 <\/strong> \n$ conda uninstall\/remove <strong>package1 package2<\/strong><\/code><\/pre>\n<p>Remove a conda environment:<\/p>\n<pre><code>$ conda env remove -n <strong>env_name<\/strong><\/code><\/pre>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;conda python&#8221; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; header_font=&#8221;|600|||||||&#8221; header_text_color=&#8221;#221f72&#8243; header_font_size=&#8221;26px&#8221; header_2_text_color=&#8221;#221f72&#8243; header_2_font_size=&#8221;24px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2 id=\"usepython\">Using Conda with Python<\/h2>\n<p>Make sure to unset PYTHONPATH and PYTHONHOME in case they are specified previously:<\/p>\n<pre><code>$ unset PYTHONPATH \n$ unset PYTHONHOME<\/code><\/pre>\n<p>The version of Python in the conda environment can be specified when creating the conda environment, for example, specify python 3.6 to be used in the environment \u201ctest\u201d:<\/p>\n<pre><code>$ conda create \u2013n <strong>test python=3.6<\/strong><\/code><\/pre>\n<p>Or install python after creating the conda environment:<\/p>\n<pre><code>$ conda install python=3.6 <\/code><\/pre>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;conda R&#8221; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; header_font=&#8221;|600|||||||&#8221; header_text_color=&#8221;#221f72&#8243; header_font_size=&#8221;26px&#8221; header_2_text_color=&#8221;#221f72&#8243; header_2_font_size=&#8221;24px&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2 id=\"user\">Using Conda with R<\/h2>\n<p>Make sure to unset R_LIBS and R_LIBS_USER in case they are specified previously:<\/p>\n<pre><code>$ unset R_LIBS \n$ unset R_LIBS_USER <\/code><\/pre>\n<p>Also, you might need to comment lines related to these variables in .Renviron and .Rprofile file in your home directory.<br \/>\nThe version of R in the conda environment can be specified when creating the conda environment, for example, specify R 4.2.0 to be used in the environment \u201ctest\u201d:<\/p>\n<pre><code>$ conda create \u2013n test r-base=4.2.0 <\/code><\/pre>\n<p>Or install R after creating the conda environment:<\/p>\n<pre><code>$ conda install r-base=4.2.0 <\/code><\/pre>\n<p>When using conda to install R packages, you will need to add r- before the regular package name. For instance, if you want to install rbokeh, you will need to use:<\/p>\n<pre><code>$ conda install r-rbokeh  <\/code><\/pre>\n<p>or for rJava, type:<\/p>\n<pre><code>$ conda install r-rjava <\/code><\/pre>\n<p>For more information about using conda, please <a href=\"https:\/\/docs.conda.io\/projects\/conda\/en\/latest\/user-guide\/tasks\/manage-environments.html\">click here<\/a>.[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scientific Computing and Data \/ High Performance Computing \/ Documentation \/ CondaConda ContentsUsageUsing Conda with PythonUsing Conda with R Conda is an open-source package management system and environment management system that runs on Windows, macOS, Linux and z\/OS. Conda quickly installs, runs and updates packages and their dependencies. Conda easily creates, saves, loads and switches [&hellip;]<\/p>\n","protected":false},"author":624,"featured_media":0,"parent":35,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-10545","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/labs.icahn.mssm.edu\/minervalab\/wp-json\/wp\/v2\/pages\/10545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.icahn.mssm.edu\/minervalab\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/labs.icahn.mssm.edu\/minervalab\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/labs.icahn.mssm.edu\/minervalab\/wp-json\/wp\/v2\/users\/624"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.icahn.mssm.edu\/minervalab\/wp-json\/wp\/v2\/comments?post=10545"}],"version-history":[{"count":13,"href":"https:\/\/labs.icahn.mssm.edu\/minervalab\/wp-json\/wp\/v2\/pages\/10545\/revisions"}],"predecessor-version":[{"id":13704,"href":"https:\/\/labs.icahn.mssm.edu\/minervalab\/wp-json\/wp\/v2\/pages\/10545\/revisions\/13704"}],"up":[{"embeddable":true,"href":"https:\/\/labs.icahn.mssm.edu\/minervalab\/wp-json\/wp\/v2\/pages\/35"}],"wp:attachment":[{"href":"https:\/\/labs.icahn.mssm.edu\/minervalab\/wp-json\/wp\/v2\/media?parent=10545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}