{"id":781,"date":"2019-05-12T09:33:27","date_gmt":"2019-05-12T08:33:27","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/htccondor\/?page_id=781"},"modified":"2025-02-21T12:00:25","modified_gmt":"2025-02-21T12:00:25","slug":"anaconda_python","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/software\/anaconda_python\/","title":{"rendered":"Anaconda Python"},"content":{"rendered":"<div class=\"entrytext\">\n<h2><span id=\"Overview\">Overview<\/span><\/h2>\n<p><a href=\"https:\/\/www.python.org\/\">Python<\/a> is an interpreted, high-level, general-purpose programming language. Python&#8217;s design philosophy emphasizes code readability with its notable use of significant whitespace. <a href=\"https:\/\/www.anaconda.com\/distribution\">Anaconda Python<\/a> is an optimized implementation of Python that includes a sizeable number of additional Python packages by default.<\/p>\n<h2>Restrictions on use\/License information<\/h2>\n<p>Python is released under the <a href=\"https:\/\/docs.python.org\/3\/license.html\">Python software foundation license<\/a> and Anaconda Python is released under the <a href=\"https:\/\/en.wikipedia.org\/wiki\/BSD_licenses#3-clause_license_(%22Revised_BSD_License%22,_%22New_BSD_License%22,_or_%22Modified_BSD_License%22)\">new BSD license<\/a>.<\/p>\n<p>There is no restriction on the number of simultaneously running programs on HTCondor.<\/p>\n<h2><span id=\"Versions_installed\">Versions installed<\/span><\/h2>\n<table border=\"1\" align=\"center\">\n<tbody>\n<tr>\n<th align=\"center\">Anaconda Python version<\/th>\n<th align=\"center\">HTCondor ClassAd<\/th>\n<th align=\"center\">Executable Name<\/th>\n<th align=\"center\">Environment<\/th>\n<\/tr>\n<tr>\n<td align=\"center\">2.7.5<\/td>\n<td align=\"center\">HAS_PYTHON_2_7<\/td>\n<td align=\"center\">\/usr\/bin\/python<\/td>\n<td align=\"center\"><\/td>\n<\/tr>\n<tr>\n<td align=\"center\">3.7.12<\/td>\n<td align=\"center\">HAS_PYTHON_3_7_12<\/td>\n<td align=\"center\">\/opt\/anaconda3\/envs\/python37\/bin\/python<\/td>\n<td align=\"center\">\/opt\/anaconda3\/envs\/python37<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">3.8.12<\/td>\n<td align=\"center\">HAS_PYTHON_3_8_12<\/td>\n<td align=\"center\">\/opt\/anaconda3\/envs\/python38\/bin\/python<\/td>\n<td align=\"center\">\/opt\/anaconda3\/envs\/python38<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">3.9.7<\/td>\n<td align=\"center\">HAS_PYTHON_3_9_7<\/td>\n<td align=\"center\">\/opt\/anaconda3\/bin\/python<\/td>\n<td align=\"center\">\/opt\/anaconda3<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">3.10.2<\/td>\n<td align=\"center\">HAS_PYTHON_3_10_2<\/td>\n<td align=\"center\">\/opt\/anaconda3\/envs\/python310\/bin\/python<\/td>\n<td align=\"center\">\/opt\/anaconda3\/envs\/python310<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span id=\"Set_up_procedure_on_submit_node\">Set up procedure on submit node<\/span><\/h2>\n<p>Whilst Python is installed on every linux machine by default, in order to use a consistent version across all HTCondor clients, Anaconda Python should be used. To use a specific version of Anaconda Python, first run the command:<\/p>\n<pre>module load python\/&lt;Anaconda Python version&gt;\r\n<\/pre>\n<h2><span id=\"Running_the_application\">Running the application<\/span><\/h2>\n<p>The following lines are the contents of a generic HTCondor submit text file for a simple Python job.<\/p>\n<pre>Universe = vanilla\r\n\r\nRequirements = (Target.Opsys == \"LINUX\" &amp;&amp; Target.Arch == \"X86_64\" &amp;&amp; &lt;HTCondor ClassAd&gt;=?=True)\r\nRequest_Memory = 1000\r\n\r\nLog = python.log\r\nOutput = python.out\r\nError = python.error\r\nNotification = Error\r\n\r\nShould_Transfer_Files = Yes\r\nWhen_To_Transfer_Output = On_Exit\r\n\r\nExecutable = \/opt\/anaconda3\/envs\/python37\/bin\/python\r\n# For different Python versions use the executable name from the table above\r\nTransfer_Executable = False\r\nArguments = &lt;script&gt;.py &lt;input_arguments&gt;\r\nEnvironment = PYTHONHOME=\/opt\/anaconda3\/envs\/python37\r\n# For different Python versions use the Environment from the table above \r\nTransfer_Input_Files = &lt;script&gt;.py\r\n\r\nQueue\r\n<\/pre>\n<p>If your submit file is called <tt>submit.txt<\/tt> then your job can be submitted to HTCondor using the command <tt>condor_submit submit.txt<\/tt>.<\/p>\n<h2>Sample Anaconda Python HTCondor jobs<\/h2>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><a href=\"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/software\/python_calculate_pi\">Python code for calculating Pi using <em>n<\/em> terms of the Gregory series<\/a>.<\/li>\n<li><a href=\"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/software\/python_installed_packages\">Python code for installing and listing available Python modules<\/a>.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview Python is an interpreted, high-level, general-purpose programming language. Python&#8217;s design philosophy emphasizes code readability with its notable use of significant whitespace. Anaconda Python is an optimized implementation of Python that includes a sizeable number of additional Python packages by default. Restrictions on use\/License information Python is released under the Python software foundation license and Anaconda Python is released under the new BSD license. There is no restriction on the number of simultaneously running programs.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/software\/anaconda_python\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":17,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-781","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/comments?post=781"}],"version-history":[{"count":17,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/781\/revisions"}],"predecessor-version":[{"id":1231,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/781\/revisions\/1231"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/17"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/media?parent=781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}