{"id":148405,"date":"2023-10-20T10:42:18","date_gmt":"2023-10-20T14:42:18","guid":{"rendered":"http:\/\/www.bu.edu\/tech\/?page_id=148405"},"modified":"2024-07-03T13:23:25","modified_gmt":"2024-07-03T17:23:25","slug":"python-modules","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/support\/research\/software-and-programming\/common-languages\/python\/python-software\/python-modules\/","title":{"rendered":"Python Modules"},"content":{"rendered":"<p><a name=\"top\"><\/a><br \/>\n<strong>Sections<\/strong><\/p>\n<ul>\n<li><a href=\"#Python Modules\">Python Modules<\/a><\/li>\n<li><a href=\"#packages\">Pre-Installed Python Packages<\/a><\/li>\n<li><a href=\"#System\">System Level Python<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><a name=\"Python Modules\"><\/a><\/p>\n<h2>Python Modules<\/h2>\n<p>For most computational use cases, the most recent version of these general purpose installations is the best choice. We offer python2,\u00a0python3, and maintain older versions for reproducibility. These modules are configured for general use and already contain many commonly used python packages.<\/p>\n<p>To load the default version of python3, use the following command in terminal:<\/p>\n<pre><code class=\"code-block\"><span class=\"prompt\">[rcs@scc1 ~]<\/span> <span class=\"command\">module load python3<\/span><\/code><\/pre>\n<p>We recommend always specifying the version of the module you will load. This prevents breaking your workflow\/pipeline in case we upgrade the default version of a module to a newer one.<\/p>\n<p><strong>Update Frequency:<\/strong><br \/>\nWe install new Python modules approximately every 12-18 months to keep up to date with changes in Python libraries installed with the module. The Python libraries installed within the Python modules are updated to their latest versions when the module is installed.<\/p>\n<p>The most recent listing of python installations\u00a0on SCC can be queried using the <a href=\"https:\/\/www.bu.edu\/tech\/support\/research\/software-and-programming\/software-and-applications\/modules\/\">module system<\/a> with the following command:<\/p>\n<pre><code class=\"code-block\"><span class=\"prompt\">[rcs@scc1 ~]<\/span> <span class=\"command\">module avail python3<\/span><\/code><\/pre>\n<p>&nbsp;<\/p>\n<p><a name=\"packages\"><\/a><\/p>\n<h2>Pre-Installed Python Packages<\/h2>\n<p>In addition to providing Python modules on the SCC, we have installed many of the commonly used packages so you don&#8217;t have to. To see all available packages in the Python module you have loaded run the following command:<\/p>\n<pre><code class=\"code-block\"><span class=\"prompt\">[rcs@scc1 ~]<\/span> <span class=\"command\">pip freeze<\/span><\/code><\/pre>\n<p>To check if a specific package and version (nipype in this example) is installed run the following command:<\/p>\n<pre><code class=\"code-block\"><span class=\"prompt\">[rcs@scc1 ~]<\/span> <span class=\"command\"> pip freeze |grep<\/span> <span class=\"placeholder\">nipype<\/span>\r\nnipype==1.8.6\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p><a name=\"System\"><\/a><\/p>\n<h2>System Level Python<\/h2>\n<p>Python 3.6.8 is the default version available installed with the operating system on the SCC. This does not contain many useful packages such as scipy and pandas and it is intended more for system administration purposes. We recommend using the module system as described in detail above.<\/p>\n<p><a href=\"#top\">Back to top<\/a><\/p>\n<div style=\"float: right;\">\n<p id=\"last-modified-timestamp\" style=\"margin: 0;\">Last updated: Loading&#8230;<\/p>\n<\/div>\n<p><script>\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\n    \/\/ Get the content of the meta tag\r\n    var lastUpdatedContent = document.querySelector('meta[name=\"last-updated\"]').content;\r\n    \r\n    \/\/ Parse the content into a Date object\r\n    var lastUpdatedDate = new Date(lastUpdatedContent);\r\n    \r\n    \/\/ Format the date\r\n    var formattedDate = lastUpdatedDate.toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' });\r\n    \r\n    \/\/ Update the HTML element with the formatted date\r\n    document.getElementById('last-modified-timestamp').innerHTML = 'Last updated: ' + formattedDate;\r\n});\r\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sections Python Modules Pre-Installed Python Packages System Level Python &nbsp; Python Modules For most computational use cases, the most recent version of these general purpose installations is the best choice. We offer python2,\u00a0python3, and maintain older versions for reproducibility. These modules are configured for general use and already contain many commonly used python packages. To&#8230;<\/p>\n","protected":false},"author":1692,"featured_media":0,"parent":147618,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/148405"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/1692"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=148405"}],"version-history":[{"count":18,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/148405\/revisions"}],"predecessor-version":[{"id":153103,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/148405\/revisions\/153103"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/147618"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=148405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}