{"id":3079,"date":"2022-08-21T19:32:00","date_gmt":"2022-08-21T19:32:00","guid":{"rendered":"https:\/\/lucylabs.gatech.edu\/ml4t\/?page_id=3079"},"modified":"2022-08-27T02:32:04","modified_gmt":"2022-08-27T02:32:04","slug":"local-environment","status":"publish","type":"page","link":"https:\/\/lucylabs.gatech.edu\/ml4t\/fall2022\/local-environment\/","title":{"rendered":"Local Environment"},"content":{"rendered":"<p>[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.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][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 _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;663a47da-552b-405b-bf2a-2d2e60162be4&#8243; header_font=&#8221;|700||on|||||&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h1 id=\"firstHeading\" class=\"firstHeading\" lang=\"en\" style=\"text-align: center;\"><span dir=\"auto\">ML4T Local Environment<\/span><\/h1>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][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 _builder_version=&#8221;4.18.0&#8243; _module_preset=&#8221;663a47da-552b-405b-bf2a-2d2e60162be4&#8243; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2><span class=\"mw-headline\" id=\"Overview\">Revisions<\/span><\/h2>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;663a47da-552b-405b-bf2a-2d2e60162be4&#8243; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2><span class=\"mw-headline\" id=\"Overview\">Overview<\/span><\/h2>\n<p><span data-contrast=\"auto\">The assignments in this class are in Python (version 3.6) and rely heavily on a few important libraries. These libraries are under active development, which unfortunately means that there can be some compatibility issues between versions. The information on this page describes the local environment that will mirror the one that is used during testing. A local development environment is required for the development and testing of the code that satisfies each projects&#8217; requirements. <\/span><b><span data-contrast=\"auto\">We strongly recommended establishing a local Linux project environment as described below<\/span><\/b><span data-contrast=\"auto\">.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Should you decide to define and use a non-Linux environment, please keep in mind that your code MUST run correctly on GradeScope, which using a Linux environment like as described below. <\/span><b><span data-contrast=\"auto\">If your code fails to run on Gradescope, stating that \u201c<\/span><\/b><b><i><span data-contrast=\"auto\">it works on my machine<\/span><\/i><\/b><b><span data-contrast=\"auto\">\u201d is not a valid excuse and you will receive no credit.<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><i><span data-contrast=\"auto\">Note: This course began using Python 3.6 in Fall 2019. Be careful to avoid using course Wiki pages, environment configuration instructions, and project templates from prior terms. Please use the material associated with this term only.<\/span><\/i><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;663a47da-552b-405b-bf2a-2d2e60162be4&#8243; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2><b><span data-contrast=\"auto\">REQUIREMENTS<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Dual Operating System Environment:<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li data-leveltext=\"o\" data-font=\"Courier New\" data-listid=\"1\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"2\"><span data-contrast=\"auto\">Windows or macOS <\/span><span data-contrast=\"auto\">for Exams<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"o\" data-font=\"Courier New\" data-listid=\"1\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"2\"><span data-contrast=\"auto\">Linux <\/span><span data-contrast=\"auto\">for Projects<\/span><span data-contrast=\"auto\">. We strongly recommend <\/span><a href=\"https:\/\/ubuntu.com\/download\/desktop\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">Ubuntu LTS<\/span><\/a><span data-contrast=\"auto\"> or <\/span><a href=\"https:\/\/mxlinux.org\/\" target=\"_blank\" rel=\"noopener\">MX Linux<\/a><span data-contrast=\"auto\">. Linux can be installed in one of several ways, including dual-boot, bootable USB, Docker, Vagrant, Windows Subsystem for Linux 2 (WSL2), and in Virtual Machines (VMs) (e.g., <\/span><a href=\"https:\/\/www.vmware.com\/products\/workstation-player.html\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">VMWare Workstation Player<\/span><\/a><span data-contrast=\"auto\">, <\/span><a href=\"https:\/\/www.virtualbox.org\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">VirtualBox<\/span><\/a><span data-contrast=\"auto\">, or <\/span><a href=\"https:\/\/www.parallels.com\/products\/desktop\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">Parallels<\/span><\/a><span data-contrast=\"auto\">).<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">While the course does not provide a local development environment, we will demonstrate how to create a local environment using Linux and a Virtual Machine in the course discussion forum.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Remote (Private) Backup<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li data-leveltext=\"o\" data-font=\"Courier New\" data-listid=\"1\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"2\"><span data-contrast=\"auto\">Georgia Tech GitHub, GitHub (set to private), DropBox, or OneDrive, etc.\u00a0<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">Backups are primarily for your security, so that if something should happen that results in a loss of code (e.g., broken or stolen laptop, accidentally deleted files) you can recover your work and be up and running quickly. For example, a VM can be installed with the code from a remote backup in approximately one hour.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\"><\/span><\/p>\n<h2><b><span data-contrast=\"auto\">LOCAL ENVIRONMENT SETUP<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">To ensure that your local environment is compatible with the Gradescope environment that will be available for remote testing and used to execute and grade project submissions, we recommend that the local environment use the exact same library and package versions. Below is a list of each package and version number, provided in the Conda Environment format.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;]<script src=\"https:\/\/gist.github.com\/CS7646-ML4T\/69da123d8c4999b2ac99397a6b01807d.js\"><\/script>[\/et_pb_code][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;663a47da-552b-405b-bf2a-2d2e60162be4&#8243; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2><b><span data-contrast=\"auto\">LOCAL FILESYSTEM SETUP<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">If you are familiar with conda, you can use this to create an environment for this class that matches those version numbers. Here is an outline:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<ol>\n<li data-leveltext=\"%1.\" data-font=\"Calibri, Calibri_MSFontService, sans-serif\" data-listid=\"8\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Install miniconda or anaconda (if it is not already installed). Save the above YML fragment as environment.yml.<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"%1.\" data-font=\"Calibri, Calibri_MSFontService, sans-serif\" data-listid=\"8\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Create an environment for this class:<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ol>\n<ol><\/ol>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;]<script src=\"https:\/\/gist.github.com\/CS7646-ML4T\/167dd864cdba0be235b94b994d27b587.js\"><\/script>[\/et_pb_code][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;663a47da-552b-405b-bf2a-2d2e60162be4&#8243; global_colors_info=&#8221;{}&#8221;]<\/p>\n<p>3. Activate the new environment:<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;]<script src=\"https:\/\/gist.github.com\/CS7646-ML4T\/235acf44098561bc5ccecfa7385c96b4.js\"><\/script>[\/et_pb_code][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;663a47da-552b-405b-bf2a-2d2e60162be4&#8243; global_colors_info=&#8221;{}&#8221;]<\/p>\n<p><span data-contrast=\"auto\" xml:lang=\"EN-US\" lang=\"EN-US\" class=\"TextRun SCXW125556648 BCX4\"><span class=\"NormalTextRun SCXW125556648 BCX4\">Please see the ML4T_Software Setup page for information on how to set up, run, and check out the code scaffolding for the projects. This scaffolding, which is installed once, is required for each project. Once installed you should have a directory folder that looks <\/span><span class=\"NormalTextRun SCXW125556648 BCX4\">like<\/span><span class=\"NormalTextRun SCXW125556648 BCX4\"> the image below:<\/span><\/span><span class=\"EOP SCXW125556648 BCX4\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;http:\/\/lucylabs.gatech.edu\/ml4t\/wp-content\/uploads\/2021\/05\/base_dir.png&#8221; title_text=&#8221;base_dir&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;d2af8005-8214-4ced-9607-dcf6e5adf8eb&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][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 _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;663a47da-552b-405b-bf2a-2d2e60162be4&#8243; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2><b><span data-contrast=\"auto\">LOCAL PROJECT FILES SETUP<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Please use the project templates associated with each project. Each template will create a new directory at the same level as the data and grading folders. These templates can be downloaded at once at the start of the term, or before beginning to work on each project.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h3><b><span data-contrast=\"auto\">IDEs<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">We recommend using an IDE, which will aid in the development and debugging. In past terms, students have primarily used <\/span><a href=\"https:\/\/www.jetbrains.com\/pycharm\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">PyCharm<\/span><\/a><span data-contrast=\"auto\">, <\/span><a href=\"https:\/\/www.spyder-ide.org\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">Spyder<\/span><\/a><span data-contrast=\"auto\">, and <\/span><a href=\"https:\/\/visualstudio.microsoft.com\/vs\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">Visual Studio<\/span><\/a><span data-contrast=\"auto\">. Some students have also used <\/span><a href=\"https:\/\/jupyter.org\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">Jupyter<\/span><\/a><span data-contrast=\"auto\"> Notebook.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><i><span data-contrast=\"auto\">Note: Assignments will require python .py files. Jupyter notebook files will not be accepted.<\/span><\/i><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h3><b><span data-contrast=\"auto\">ADVISORIES<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Apple M1-Based Computers<\/span><\/b><span data-contrast=\"auto\">: In Spring 2021, some students advised that they were unable to install the necessary software on Apple\u2019s new M1-based computers and virtual machine software had not yet been released. They had to switch to an Intel or AMD-based computer for the projects. In 2Q2021, Parallels released \u201cParallels Desktop 16 for Mac\u201d, which they advise can be used to create virtual machines on M1-based computers.<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Using Windows or macOS for projects<\/span><\/b><span data-contrast=\"auto\">: While these instructions should work for Windows and macOS, we have observed differences that can prevent projects from executing locally. While some students have had success completing the projects using Windows or macOS, others were unable to overcome some of the challenges and moved to Linux mid-course. Since switching OSes mid-term can be stressful, <\/span><b><span data-contrast=\"auto\">we strongly recommend using Linux for projects<\/span><\/b><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Honorlock<\/span><\/b><span data-contrast=\"auto\">: HonorLock (the software we use for exam proctoring) may run on Linux; however, the vendor does not support or recommend its use. Should a problem arise during testing, they will not work with you to attempt to resolve the issue.<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Virtual Machine OS Storage<\/span><\/b><span data-contrast=\"auto\">: If using a Virtual Machine, the storage used by the VM on which the Linux Operating System is installed should be on the local machine rather than cloud storage (eg, OneDrive, Google Drive).<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" aria-setsize=\"-1\" data-aria-posinset=\"3\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Local Environment<\/span><\/b><span data-contrast=\"auto\">: The util.py file, and the data and grading folders in the main folder are considered part of the environment. They must not be moved, copied, or edited.<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" aria-setsize=\"-1\" data-aria-posinset=\"4\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Datasets<\/span><\/b><span data-contrast=\"auto\">: We use a specific, static dataset for this course, which we will provide. If you download your own data from Google, Yahoo, or elsewhere, you will get incorrect answers on the assignments.<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" aria-setsize=\"-1\" data-aria-posinset=\"5\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Use Python 3.<\/span><\/b><b><span data-contrast=\"auto\">6<\/span><\/b><span data-contrast=\"auto\">: While the course videos will provide examples that use Python 2.x, this course will use Python 3.6 for all projects and exams. Please note that there are some language <\/span><a href=\"https:\/\/www.w3resource.com\/python\/python-2-vs-3.php\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">differences between Python 2 and Python 3<\/span><\/a><span data-contrast=\"auto\">. There are also some differences library\/package versions (see Chapter 1 of <\/span><i><span data-contrast=\"auto\">Pandas for Everyone<\/span><\/i><span data-contrast=\"auto\"> for differences in Pandas indexing). Also, be aware that there are language features in higher python versions (e.g., 3.7, 3.8, 3.9) that are not present in 3.6, such that if they are used in your code, they could pass in the local environment but fail when submitted to Gradescope (which uses Python 3.6).<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<h3><b><span data-contrast=\"auto\">KNOWN LOCAL ENVIRONMENT CHALLENGES AND WORKAROUNDS<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<h3><b><span data-contrast=\"auto\">Matplotlib on Mac<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">If you are using a Mac and when attempting to plot charts you get an exception with a stack trace, including a mention of libtk and tkinter, try the following to change the backend<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>[\/et_pb_text][et_pb_code admin_label=&#8221;Code&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;]<script src=\"https:\/\/gist.github.com\/CS7646-ML4T\/b036eef7dea3e5abdde9eed05510057f.js\"><\/script>[\/et_pb_code][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][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 _builder_version=&#8221;4.18.0&#8243; _module_preset=&#8221;663a47da-552b-405b-bf2a-2d2e60162be4&#8243; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h3><b><span data-contrast=\"auto\">\u201cFreeze_Support\u201d or \u201cAttributeError: Can\u2019t pickle local object\u201d error messages on Windows 10<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Some students have modified the local test scripts to remove the lines resulting in this message. Since those changes result in reduced functionality in the local test script, this approach should be used with caution. We recommend moving to Linux and confirming that the Conda environment is activated.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h3><b><span data-contrast=\"auto\">&#8220;ConnectionRefusedError: [Errno 111] Connection refused&#8221; message using PyCharm<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">This error has been observed in specific instances when running code <\/span><span style=\"text-decoration: underline;\">within<\/span><span data-contrast=\"auto\"> PyCharm. The workaround is to execute the code from the terminal or from a different IDE.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h3><b><span data-contrast=\"auto\">M1 Mac Conda Setup<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\"> (Student Supplied)<\/span><\/h3>\n<p class=\"amber-el amber-paragraph amber-content\">Copy the environment.yaml <a href=\"https:\/\/lucylabs.gatech.edu\/ml4t\/fall2022\/local-environment\/\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"amber-el ed-focus-outline amber-el amber-link\">in the instructions<\/a> file to your local machine and specify Rosetta mode by creating the environment using the following command:<\/p>\n<div class=\"amber-display-codeblock amber-el amber-content ed-print-hidden\">\n<div class=\"amdiscb-slot\">\n<div class=\"amber-el amber-pre\">\n<div class=\"syntax-highlight\"><code class=\"amber-el amber-code\">CONDA_SUBDIR=osx-64 conda env create -f environment.yaml<\/code><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"amber-el amber-paragraph amber-content\"><span class=\"amber-gutter\"><\/span>which should resolve the <code class=\"amber-el amber-code\">ResolvePackageNotFound<\/code> issues.<\/p>\n<p class=\"amber-el amber-paragraph amber-content\"><span class=\"amber-gutter\"><\/span>For background, Anaconda <a href=\"https:\/\/www.anaconda.com\/blog\/new-release-anaconda-distribution-now-supporting-m1\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"amber-el ed-focus-outline amber-el amber-link\">just recently started supporting <code class=\"amber-el amber-code\">ARM64<\/code> architectures<\/a>. Now that Anaconda (and miniforge3) support this architecture natively, they use <code class=\"amber-el amber-code\">ARM64<\/code> compiled packages exclusively. The Python project announced that Python 3.7 and earlier <a href=\"https:\/\/bugs.python.org\/msg382939\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"amber-el ed-focus-outline amber-el amber-link\">would not be released for this architecture<\/a>, so <code class=\"amber-el amber-code\">conda<\/code> is only able to resolve Python 3.8 and later by default.<\/p>\n<p class=\"amber-el amber-paragraph amber-content\"><span class=\"amber-gutter\"><\/span>Setting the environment variable <code class=\"amber-el amber-code\">CONDA_SUBDIR=osx-64<\/code> <a href=\"https:\/\/conda-forge.org\/docs\/user\/tipsandtricks.html#installing-apple-intel-packages-on-apple-silicon\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"amber-el ed-focus-outline amber-el amber-link\">forces <code class=\"amber-el amber-code\">conda<\/code> to install Intel packages<\/a>. These run under emulation and will have a performance impact.<\/p>\n<p class=\"amber-el amber-paragraph amber-content\"><span class=\"amber-gutter\"><\/span>Attempted with both miniforge3-4.10.3-10 and anaconda3-2022.05.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ML4T Local EnvironmentRevisionsOverview The assignments in this class are in Python (version 3.6) and rely heavily on a few important libraries. These libraries are under active development, which unfortunately means that there can be some compatibility issues between versions. The information on this page describes the local environment that will mirror the one that is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":3071,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"<!-- wp:divi\/placeholder \/-->","_et_gb_content_width":"","footnotes":""},"class_list":["post-3079","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lucylabs.gatech.edu\/ml4t\/wp-json\/wp\/v2\/pages\/3079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lucylabs.gatech.edu\/ml4t\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lucylabs.gatech.edu\/ml4t\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lucylabs.gatech.edu\/ml4t\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lucylabs.gatech.edu\/ml4t\/wp-json\/wp\/v2\/comments?post=3079"}],"version-history":[{"count":5,"href":"https:\/\/lucylabs.gatech.edu\/ml4t\/wp-json\/wp\/v2\/pages\/3079\/revisions"}],"predecessor-version":[{"id":3330,"href":"https:\/\/lucylabs.gatech.edu\/ml4t\/wp-json\/wp\/v2\/pages\/3079\/revisions\/3330"}],"up":[{"embeddable":true,"href":"https:\/\/lucylabs.gatech.edu\/ml4t\/wp-json\/wp\/v2\/pages\/3071"}],"wp:attachment":[{"href":"https:\/\/lucylabs.gatech.edu\/ml4t\/wp-json\/wp\/v2\/media?parent=3079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}