Python-Installationx

Download Report

Transcript Python-Installationx

Introduction to
Computational Thinking
Installing Python
(C) Dennis Kafura
1
CT@VT
Installation Overview

As soon as you arrive:
1.
2.
Obtain USB drive
Copy


Computational_thinking folder
Either


3.
4.
5.
6.


Anaconda3-4.2.0-Windows
Anaconda3-4.2.0-MacOSX
After it is copied pass the USB drive along
Install Anaconda
Launch spyder
Set Global Working Directory
Download slides for installation details
Do classwork/homework
(C) Dennis Kafura
Slide 2
CT@VT
Why are there all these animals?

Python: A programming language
and a program that executes
Python code

Spyder: A nice editor for writing
Python programs. Think of it as
“Microsoft Word”.

Anaconda: A bundle of Python,
Spyder, and other useful tools.
Think of it as “Microsoft Office”.
(C) Dennis Kafura
Slide 3
Installation Directions
CT@VT

Step 1 – Get files


Insert USB drive
Copy two things to desktop


Computational_thinking
And one of…



PC – Anaconda-4.2.0-Windows-x86.exe
MAC - Anaconda-4.2.0-MaxOSX-x86_64.pkg
Eject USB Drive
(C) Dennis Kafura
Slide 4
CT@VT
Installation Directions

Step 2 - PC



Run Anaconda file
Click, Next, I Agree, Select Just Me/Next,
Next, Install
Step 2 – Mac



Be sure you are connected to the network
Run Anaconda file
Continue, Continue, Continue, Agree, Install
for me only/Continue, Install
(C) Dennis Kafura
Slide 5
CT@VT
Use



All the Python code you develop MUST
be in the computational_thinking folder.
You can place this folder wherever you
want
Remember where you put it!!
(C) Dennis Kafura
Slide 6
CT@VT
Spyder

1) Open it up

Windows:
“Start Button” -> “Programs” -> “Anaconda” -> “Spyder”


Mac:



For convenience, you can drag the “Spyder” to the desktop or right
click to pin it to the taskbar
Javier will help you create a shortcut to spyder
Alternatively, if Javier isn’t there, you can use the
“Anaconda Navigator” (or “Launcher”) – can take a little
while on some machines
2) Set up your Global Working Directory
(next slide)
(C) Dennis Kafura
Slide 7
CT@VT
Global Working Directory



In Spyder, just the first time you start…
Windows: Tools -> Preferences -> Global Working Directory
Mac: python -> Preferences -> Global Working Directory
(C) Dennis Kafura
Slide 8
CT@VT
Saving things

Always save everything to your
“computational_thinking” folder

When you open up spyder, it makes a
temporary file. Open a new file instead,
and immediately save it to your
“computational_thinking” folder.
(C) Dennis Kafura
Slide 9
CT@VT



Running things
Click the green
triangle in the top left.
Click Run
This only appears the
first time you use
Run.
(C) Dennis Kafura
10
CT@VT
Next steps today

Complete installation


Check with us if you have problems
Complete Coursework and Homework
exercises for today and previous days
(C) Dennis Kafura
Slide 11