0% found this document useful (0 votes)
2 views

CSE488_Lab1_Configuration

This document outlines the objectives and configuration steps for setting up a Python development environment using Anaconda as part of the Mechatronics Engineering and Automation Program. It covers the importance of virtual environments for project isolation, package management tools like Conda and PIP, and provides detailed installation instructions for Windows, Linux, and MacOS. Additionally, it introduces the Spyder IDE and Jupyter Notebooks as essential tools for scientific computing and data analysis.

Uploaded by

Fady Kamil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

CSE488_Lab1_Configuration

This document outlines the objectives and configuration steps for setting up a Python development environment using Anaconda as part of the Mechatronics Engineering and Automation Program. It covers the importance of virtual environments for project isolation, package management tools like Conda and PIP, and provides detailed installation instructions for Windows, Linux, and MacOS. Additionally, it introduces the Spyder IDE and Jupyter Notebooks as essential tools for scientific computing and data analysis.

Uploaded by

Fady Kamil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Mechatronics Engineering and Automation Program

CSE488: Computational Intelligence


Lab #01: Environment Configuration

Objectives:
 Introduce concepts of Virtual Environments and Package Management.
 Setup a Python development environment.
o Install Anaconda
o Getting Started with Spyder IDE and Jupyter Notebooks
o Explore main tasks in Anaconda (Environments and Packages Management)

Configuration
In this section we will talk about how to setup an environment for Python development. We
will use anaconda distribution for installing and working with Python, however feel free to
setup your favorite environment as you like.

Virtual Environments
The virtual environment is basically a room open for your specific coding project. Instead of
using os-wide defined Python or Python packages, it aims to isolate your Python and its
dependent packages from all projects that are hosted by your computer.
As an example, let us imagine that one of your projects using let's say Numpy 1.16.4 but one
another project that was written a few months ago highly depends on a deprecated feature on
Numpy 1.15.4. if you try to use Numpy in your base python you will likely fail to run at least
one of them. And also Numpy is a package that everyone relies to and its relevantly easy to
understand when it comes to the package incompatibility.
So if you open two different virtual environments for this project of yours and install
different Numpy packages you are ready to go and likely to write a less error-some code.

Virtual Virtual
Environment 1 Environment 2
Numpy 1.16.4 Numpy 1.15.4

Project Project
1 2
Mechatronics Engineering and Automation Program
CSE488: Computational Intelligence
Lab #01: Environment Configuration

Package Management
A package manager is a tool that allows you to install additional libraries and packages that
are not part of the standard Python library such as the ones found in the Python Package
Index. If your version of Python is 2.7.9 (or greater) or Python 3.4 (or greater), then PIP
package manager comes pre-installed with Python, in other cases you will have to install it
separately. While we will be using Conda package manager, PIP package manager is
installed by default in the python version and can also be used.

Anaconda

Anaconda is a free distribution of Python packages distributed by Continuum Analytics


(https://www.anaconda.com). This distribution supports Linux, Windows, and MacOS X
operating systems. Anaconda, in addition to providing the latest packages released in the
Python world, comes bundled with most of the tools you need to set up a Python
development environment.
Indeed, when you install the Anaconda distribution on your system, you can use many tools
and applications described in this chapter, without worrying about having to install and
manage each separately. The basic distribution includes Spyder as the IDE, IPython
QtConsole, and Notebook.

Installing Anaconda
System Requirements
 Operating system: Windows 8 or newer, 64-bit macOS 10.13+, or Linux, including
Ubuntu, RedHat, CentOS 6+, and others.
Mechatronics Engineering and Automation Program
CSE488: Computational Intelligence
Lab #01: Environment Configuration

 System architecture: Windows- 64-bit x86, 32-bit x86; MacOS- 64-bit x86; Linux-
64-bit x86, 64-bit Power8/Power9.
 Minimum 5 GB disk space to download and install.

Installing on windows
Installing Anaconda for windows is straightforward process:
Use the windows installer in the following link and proceed with the steps for installation.
1. Double click the installer to launch.
Note: If you encounter issues during installation, temporarily disable your anti-virus
software during install, then re-enable it after the installation concludes. If you
installed for all users, uninstall Anaconda and re-install it for your user only and try
again.
2. Click Next.
3. Read the licensing terms and click “I Agree”.
4. Select an install for “Just Me” unless you’re installing for all users (which requires
Windows Administrator privileges) and click Next.
5. Select a destination folder to install Anaconda and click the Next button.
Note: Install Anaconda to a directory path that does not contain spaces or unicode
characters.

6. Choose whether to add Anaconda to your PATH environment variable. We


recommend not adding Anaconda to the PATH environment variable, since this can
Mechatronics Engineering and Automation Program
CSE488: Computational Intelligence
Lab #01: Environment Configuration

interfere with other software. Instead, use Anaconda software by opening Anaconda
Navigator or the Anaconda Prompt from the Start Menu.
7. Choose whether to register Anaconda as your default Python. Unless you plan on
installing and running multiple versions of Anaconda or multiple versions of Python,
accept the default and leave this box checked.
8. Click the Install button. If you want to watch the packages Anaconda is installing,
click Show Details.
9. Click the Next button.
10. Optional: To install PyCharm for Anaconda, click on the link
to https://www.anaconda.com/pycharm. Or to install Anaconda without PyCharm,
click the Next button.
11. After a successful installation you will see the “Thanks for installing Anaconda”
dialog box:

Installing on Linux
Check the following link: https://docs.anaconda.com/anaconda/install/linux/

Installing on Mac
Check the following link: https://docs.anaconda.com/anaconda/install/mac-os/

Getting started with Anaconda


You can use anaconda through the anaconda navigator (GUI) or through Anaconda Prompt to
use command lines.

You can launch any of the preinstalled applications from the Navigator as the following
figure or by typing command in the command prompt.
Mechatronics Engineering and Automation Program
CSE488: Computational Intelligence
Lab #01: Environment Configuration

Type spyder IDE type spyder to the command window, use command jupyter notebook to
open an instance of jupyter notebooks.

Spyder IDE
Spyder is a powerful scientific environment written in Python, for Python, and designed by
and for scientists, engineers and data analysts. It offers a unique combination of the advanced
editing, analysis, debugging, and profiling functionality of a comprehensive development tool
with the data exploration, interactive execution, deep inspection, and beautiful visualization
capabilities of a scientific package.
Beyond its many built-in features, its abilities can be extended even further via its plugin
system and API.
Jupyter Notebooks
The Jupyter Notebook is an open-source web application that allows you to create and share
documents that contain live code, equations, visualizations and narrative text. Uses include:
data cleaning and transformation, numerical simulation, statistical modeling, data
visualization, machine learning, and much more.

Common tasks
 Environments Management (create, remove, …etc.). (using Navigator, using Conda)
 Package Management (install, remove, …etc.) (using Navigator, using Conda)

You might also like