{"id":137691,"date":"2021-11-08T10:33:23","date_gmt":"2021-11-08T15:33:23","guid":{"rendered":"http:\/\/www.bu.edu\/tech\/?page_id=137691"},"modified":"2022-03-11T13:49:29","modified_gmt":"2022-03-11T18:49:29","slug":"spyder","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/support\/research\/software-and-programming\/common-languages\/spyder\/","title":{"rendered":"Spyder"},"content":{"rendered":"<h1>Spyder<\/h1>\n<p><a href=\"https:\/\/www.spyder-ide.org\/\">Spyder<\/a> is a Python integrated development environment (IDE). It allows for editing, debugging, and optimizing Python code and can be used effectively for large projects as well as short Python scripts. It is similar in its layout and functionality to the Matlab GUI and RStudio.\u00a0 Spyder is available on the SCC by loading a python3 module.\u00a0 After loading a python3 module, the version of Spyder that is available can be checked using the <code><span class=\"command\">pip<\/span><\/code> command.\u00a0 The Spyder IDE can be launched with the <code><span class=\"command\">spyder<\/span><\/code> command:<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc1%<\/span> <span class=\"command\">module<\/span> load python3\/3.8.10\r\n<span class=\"prompt\">scc1%<\/span> <span class=\"command\">pip<\/span> list | <span class=\"command\">grep<\/span> spyder\r\n<span class=\"output\">pyls-spyder                   0.4.0\r\nspyder                        5.0.1\r\nspyder-kernels                2.0.2\r\nspyder-line-profiler          0.2.1\r\nspyder-memory-profiler        0.2.1\r\nWARNING: You are using pip version 21.1.1; however, version 22.0.4 is available.\r\nYou should consider upgrading via the '\/share\/pkg.7\/python3\/3.8.10\/install\/bin\/python3.8 -m pip install --upgrade pip' command.<\/span>\r\n<span class=\"prompt\">scc1%<\/span> <span class=\"command\">spyder &amp;<\/span><\/code><\/pre>\n<h3>Conda Environments<\/h3>\n<p>If you want to install Spyder into a conda environment, first activate your environment and then run:<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc1%<\/span> <span class=\"command\">conda<\/span> install spyder<\/code><\/pre>\n<h3>Recommendations<\/h3>\n<ul>\n<li>Use the menu option<em> Run\u2192Configuration per File<\/em> to control how your Python script is run. This lets you set a working directory for the script, assign command line arguments, and many other options.<\/li>\n<li>The <em>Project<\/em> menu lets you create a project.\u00a0 The Spyder documentation <a href=\"https:\/\/docs.spyder-ide.org\/current\/panes\/projects.html\">describes this in detail<\/a>. A project makes working with multiple Python files significantly easier.<\/li>\n<li>The Spyder documentation has a number of <a href=\"https:\/\/docs.spyder-ide.org\/current\/videos\/first-steps-with-spyder.html\">short tutorial videos<\/a> on using Spyder.<\/li>\n<li>Use the Outline Viewer (enable with the <em>View\u2192Panes\u2192Outline<\/em> option) to see cells in the script. A cell is created with a comment line that starts with <code>#%%<\/code>.\u00a0 Adding these to your script allows you to use the Outline Viewer to quickly navigate around your code.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Spyder Spyder is a Python integrated development environment (IDE). It allows for editing, debugging, and optimizing Python code and can be used effectively for large projects as well as short Python scripts. It is similar in its layout and functionality to the Matlab GUI and RStudio.\u00a0 Spyder is available on the SCC by loading a&#8230;<\/p>\n","protected":false},"author":1692,"featured_media":0,"parent":76567,"menu_order":12,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137691"}],"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=137691"}],"version-history":[{"count":10,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137691\/revisions"}],"predecessor-version":[{"id":139225,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137691\/revisions\/139225"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/76567"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=137691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}