{"id":413,"date":"2020-03-30T08:51:25","date_gmt":"2020-03-30T12:51:25","guid":{"rendered":"https:\/\/psycomp.utsc.utoronto.ca\/support\/?p=413"},"modified":"2021-01-18T20:53:43","modified_gmt":"2021-01-19T01:53:43","slug":"module-load-a-python-environment","status":"publish","type":"post","link":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/2020\/03\/30\/module-load-a-python-environment\/","title":{"rendered":"&#8220;module load&#8221; a Python environment"},"content":{"rendered":"<p><a href=\"https:\/\/www.python.org\/doc\/sunset-python-2\/\" target=\"_blank\" rel=\"noopener noreferrer\">With Python 2 end of life on January 1, 2020<\/a>, there are no guarantees that Python 2 developers and Python 2 package developers will fix Python 2 bugs or security holes. However, Python 2 and Anaconda 2 will still be available on our cluster when we wait for vendors to catch up and migrate our Python 2 code to newer versions.<\/p>\n<p><p><strong>You can load a specific Python environment with &#8220;module load&#8221; command for your Slurm jobs.<\/strong><\/p>\n<p>1) <strong>module avail<\/strong> command lists available environment modules, for example:<\/p>\n<pre>\r\nafni  python\/anaconda2-2019.10  python\/anaconda2-old  python\/anaconda3-2020.11(default)  python\/anaconda3-old  R\/3.5.3  R\/3.6.3  R\/4.0.3\r\n<\/pre>\n<p>2) <strong>module list<\/strong> command lists loaded environment modules, for example:<\/p>\n<pre>\r\nCurrently Loaded Modulefiles:\r\n 1) python\/anaconda3-2020.11(default)\r\n<\/pre>\n<p>3) <strong>module load<\/strong> command loads an environment module, for example:<\/p>\n<pre>\r\nmodule load python\/anaconda2-2019.10\r\n<\/pre>\n<p>4) <strong>module unload<\/strong> command unloads an environment module, for example:<\/p>\n<pre>\r\nmodule unload python\/anaconda2-2019.10\r\n<\/pre>\n<p>5) <strong>which python<\/strong> command can show you the &#8220;python&#8221; command path, for example:<\/p>\n<pre>\r\n\/pkgsGPU\/anaconda3-2020.11\/bin\/python\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>With Python 2 end of life on January 1, 2020, there are no guarantees that Python 2 developers and Python 2 package developers will fix Python 2 bugs or security holes. However, Python 2 and Anaconda 2 will still be available on our cluster when we wait for vendors to catch up and migrate our &hellip; <a href=\"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/2020\/03\/30\/module-load-a-python-environment\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;&#8220;module load&#8221; a Python environment&#8221;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[3,7,5,10],"tags":[],"class_list":["post-413","post","type-post","status-publish","format-standard","hentry","category-clusterinfo","category-linuxshell","category-python","category-slurm"],"_links":{"self":[{"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/posts\/413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/comments?post=413"}],"version-history":[{"count":4,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/posts\/413\/revisions"}],"predecessor-version":[{"id":478,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/posts\/413\/revisions\/478"}],"wp:attachment":[{"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/media?parent=413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/categories?post=413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/tags?post=413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}