Install Party!!! Pyladies

Goals

You are done with this section when you

  • Have Python 2.7 installed

    • with setuptools (and pip) installed
    • and the requests library
  • Have checked out the repo for tomorrow

  • Have run the "hello_world.py" Python program from the repo

Python

Is a powerful yet friendly language created by Guido Van Rossum with powerful libraries that allow you to quickly do things.

He believes in a world where every person can program their own computer so much he started a project called CP4E (Computer Programming for Everyone). Python adheres to this philosophy.

Installation

  • Please use Python 2.7.X even though Python 3 is current. Python versions as early as 2.5 are still used in industry and there have been major changes in Python 3
  • The code in tomorrow's workshop will not run in Python 3
  • We will follow the Hitchhiker's Guide to Python for the installation.
    The links below take you to the details for your OS
OSX Windows Linux

Python installation on OSX

Follow these OSX instructions.

  • Note: Be careful to read the instructions -- for example, if you already have XCode installed, do not also install OSX-GCC-Installer.
  • When there is a dollar sign at the beginning of the line it represents the prompt
  • To edit your path:
          subl ~/.profile
    

Virtual environments are great but don't worry about them for right now.

Next slide

Python installation on Windows

Follow these Windows instructions.

If you do not have powershell, and so cannot edit your path the way the instructions say, then

  1. Go to Start → right click on Computer → click Properties → the System window will open
  2. Click on Advanced system settings → go to the Advanced tab → click on the Environment Variables button → the Environment Variables window will open
  3. In the User variables section, select Path and (carefully so you don't overwrite anything) edit the path to have this at the end: ;C:\Python27\;C:\Python27\Scripts\

Virtual environments are great but don't worry about them for right now.

Next slide

Python installation on Linux

You have Python 2.7 — you just need to get pip.

wget https://bootstrap.pypa.io/ez_setup.py \
     -O - | sudo python
sudo easy_install pip

The Linux instructions say the same thing but take too long; you can read them.

Virtual environments are great but don't worry about them for right now.

Next slide

Set up for tomorrow

  1. Install the requests, tablib, and beautifulsoup4 library. In a shell, type:

     sudo pip install requests
     sudo pip install tablib beautifulsoup4
    
  2. Fork https://github.com/tanyaschlusser/python_intro
    and clone it on your laptop
    (Forgot how? link to the GitHub slide)

  3. Run hello_world.py

     python hello_world.py
    

If everything worked, please help someone else then go to the next slide.

Woot.

See you tomorrow at 6pm

Thank you, super-smart TA's!

Becky Jacqui Lorena Ryan Saundra

Resources