Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now

Installing Python 3 and Eclipse for Mac


From:

Python 3 Essential Training

with Bill Weinman

Video: Installing Python 3 and Eclipse for Mac

- In this movie, we'll be installing Python and Eclipse on a Mac running OS10. Here we have the Python download page, and I've already downloaded Python 3.1.2 Mac OS10 installer disc image. And, if you're coming to this page and there's a later version here, use the later version. That's not going to impact how the course operates, and you're going to want to be using the latest version. Of course, Mac OS10 already comes with Python. And that's a Python in the Python two branch.
Expand all | Collapse all
  1. 5m 14s
    1. Welcome
      1m 32s
    2. Understanding prerequisites for Python
      2m 4s
    3. Using the exercise files
      1m 38s
  2. 33m 29s
    1. Getting started with "Hello World"
      4m 43s
    2. Selecting code with conditionals
      4m 45s
    3. Repeating code with a loop
      4m 13s
    4. Reusing code with a function
      2m 43s
    5. Creating sequences with generator functions
      2m 46s
    6. Reusing code and data with a class
      4m 39s
    7. Greater reusability with inheritance and polymorphism
      7m 17s
    8. Handling errors with exceptions
      2m 23s
  3. 22m 32s
    1. Installing Python 3 and Eclipse for Windows
      11m 24s
    2. Installing Python 3 and Eclipse for Mac
      11m 8s
  4. 28m 0s
    1. Creating a main script
      3m 27s
    2. Understanding whitespace in Python
      4m 8s
    3. Commenting code
      3m 28s
    4. Assigning values
      3m 37s
    5. Selecting code and values with conditionals
      4m 46s
    6. Creating and using functions
      3m 54s
    7. Creating and using objects
      4m 40s
  5. 31m 23s
    1. Understanding variables and objects in Python
      2m 46s
    2. Distinguishing mutable and immutable objects
      2m 41s
    3. Using numbers
      3m 34s
    4. Using strings
      6m 38s
    5. Aggregating values with lists and tuples
      4m 55s
    6. Creating associative lists with dictionaries
      4m 24s
    7. Finding the type and identity of a variable
      4m 45s
    8. Specifying logical values with True and False
      1m 40s
  6. 9m 42s
    1. Selecting code with if and else conditional statements
      2m 22s
    2. Setting multiple choices with elif
      2m 14s
    3. Understanding other strategies for multiple choices
      2m 38s
    4. Using the conditional expression
      2m 28s
  7. 11m 26s
    1. Creating loops with while
      1m 27s
    2. Iterating with for
      3m 54s
    3. Enumerating iterators
      3m 22s
    4. Controlling loop flow with break, continue, and else
      2m 43s
  8. 23m 28s
    1. Performing simple arithmetic
      2m 14s
    2. Operating on bitwise values
      3m 30s
    3. Comparing values
      3m 32s
    4. Operating on Boolean values
      2m 59s
    5. Operating on parts of a container with the slice operator
      6m 52s
    6. Understanding operator precedence
      4m 21s
  9. 11m 34s
    1. Using the re module
      1m 4s
    2. Searching with regular expressions
      3m 12s
    3. Replacing with regular expressions
      3m 29s
    4. Reusing regular expressions with re.compile
      3m 49s
  10. 9m 10s
    1. Learning how exceptions work
      1m 18s
    2. Handling exceptions
      4m 15s
    3. Raising exceptions
      3m 37s
  11. 23m 1s
    1. Defining functions
      6m 23s
    2. Using lists of arguments
      2m 26s
    3. Using named function arguments
      4m 32s
    4. Returning values from functions
      1m 55s
    5. Creating a sequence with a generator function
      7m 45s
  12. 47m 29s
    1. Understanding classes and objects
      5m 12s
    2. Using methods
      6m 12s
    3. Using object data
      10m 4s
    4. Understanding inheritance
      5m 11s
    5. Applying polymorphism to classes
      7m 13s
    6. Using generators
      9m 48s
    7. Using decorators
      3m 49s
  13. 18m 54s
    1. Understanding strings as objects
      3m 25s
    2. Working with common string methods
      5m 24s
    3. Formatting strings with str.format
      5m 31s
    4. Splitting and joining strings
      2m 49s
    5. Finding and using standard string methods
      1m 45s
  14. 25m 27s
    1. Creating sequences with tuples and lists
      4m 6s
    2. Operating on sequences with built-in methods
      5m 50s
    3. Organizing data with dictionaries
      4m 56s
    4. Operating on character data with bytes and byte arrays
      10m 35s
  15. 11m 46s
    1. Opening files
      2m 4s
    2. Reading and writing text files
      4m 33s
    3. Reading and writing binary files
      5m 9s
  16. 21m 27s
    1. Creating a database with SQLite 3
      6m 56s
    2. Creating, retrieving, updating, and deleting records
      7m 31s
    3. Creating a database object
      7m 0s
  17. 18m 27s
    1. Using standard library modules
      8m 0s
    2. Finding third-party modules
      5m 47s
    3. Creating a module
      4m 40s
  18. 23m 11s
    1. Dealing with syntax errors
      8m 19s
    2. Dealing with runtime errors
      4m 0s
    3. Dealing with logical errors
      4m 22s
    4. Using unit tests
      6m 30s
  19. 19m 56s
    1. Normalizing a database interface
      6m 39s
    2. Deconstructing a database application
      8m 9s
    3. Displaying random entries from a database
      5m 8s
  20. 29s
    1. Goodbye
      29s

please wait ...
Watch the Online Video Course Python 3 Essential Training
6h 36m Beginner Jul 29, 2010

Viewers: in countries Watching now:

Due to its power, simplicity, and complete object model, Python has become the scripting language of choice for many large organizations, including Google, Yahoo, and IBM. In Python 3 Essential Training, Bill Weinman demonstrates how to use Python 3 to create well-designed scripts and maintain existing projects. This course covers the basics of the language syntax and usage, as well as advanced features such as objects, generators, and exceptions. Example projects include a normalized database interface and a complete working CRUD application. Exercise files accompany the course.

Topics include:
  • A Python 3 quick start for experienced developers
  • Creating functions and objects
  • Using Python’s built-in objects and classes
  • Repeating code with loops and iterators
  • Understanding and using conditional expressions
  • Creating sequences with generators
  • Reusing code with objects and libraries
  • Handling errors with exceptions
Subjects:
Developer Web
Software:
Python
Author:
Bill Weinman

Installing Python 3 and Eclipse for Mac

- In this movie, we'll be installing Python and Eclipse on a Mac running OS10. Here we have the Python download page, and I've already downloaded Python 3.1.2 Mac OS10 installer disc image. And, if you're coming to this page and there's a later version here, use the later version. That's not going to impact how the course operates, and you're going to want to be using the latest version. Of course, Mac OS10 already comes with Python. And that's a Python in the Python two branch.

This course is using Python three. We're teaching Python three, so you're going to need to download and install this anyway, and I'll show you how to go ahead and install that alongside of the existing Python that's on your Mac already. Over here, I have the Eclipse download page. Eclipse is an integrated development environment, and we'll be using that for instructional purposes here in this course. This course, of course, is about Python, but we'll be using Eclipse IDE as a tool as we work in Python.

Eclipse is writen in Java, it's designed for Java, but it works well for many languages. A lot of people use it as their main IDE. It's multi-platform. It's very mature and well-tested. The Eclipse in the rest of the course is Eclipse from the 3.5 branch. And here I'm going to show you how to install Eclipse 3.6, because that's the current one, and that's what's being used. And the installation is a little bit different. But the usage of it, how it's going to work, is pretty much the same, so you shouldn't have any problem following along with the exercises.

There's a lot of different versions of Eclipse here. If you're using Eclipse for another purpose, feel free to use one of these other versions. I'm going to be using the classic version. I'm going to download the classic version, and I'm going to select this one, Mac OS10 64-bit. That's for the modern Macs running with an Intel processor. So I've already downloaded these files, and here they are in my downloads folder. We're going to start by installing Python. That's because our Eclipse installation will depend on the Python installation.

I'm going to go ahead and double-click on this to open the DMG. And there it is. I'm going to double-click on the Python M package. And press Continue, and Continue, and Continue, and Agree. Be sure to read the license; that's important. And Install. I'm just going to accept the default location. Type my password. And the installation was successful. So I will eject that. And then I'm going to come over here to my ...

I'm going to press Command N to get a new finder window. I'm going to come over here to Applications, and I'm going to find Python. There's Python 3.1. You'll notice this program called IDLE. We're going to be using that. It's a little shell for Python. So I'll drag that down into my dock here, and I'm going to click on that to run it. And you'll notice that is says Python 3.12. That confirms that our installation was successful.

We'll go ahead and close that for now. IDLE, quit. And we'll close this, and we'll go on to installing Eclipse. So I'll double-click here on the Eclipse archive, and that will un-archive it. And then I'm going to drag this entire folder over into my applications. And come over into Applications, find my Eclipse folder, and come in here. And I'm going to drag this Eclipse application down into my dock.

And we'll put that one right there. And I'm going to run it. I'll accept this, that I did just download it. I knew that already. I'm going to accept the default location. You can put this wherever you like, but I'm going to accept the default location and check this 'Do not ask again.' And now, here's our main Eclipse window. I'm going to go right up here to Help, and I'm going to install the PyDev development environment for Python within Eclipse.

Select Install New Software. We'll click on the Add button here, and under Add Repository, I'm going to type PyDev ... right there, for the name. And the location is PyDev.org/updates. We'll select Okay. So at this point, we're not going to be installing the Mylyn integration, so you don't want to check that, you just want to check this here. You want to open this little triangle and make sure that there's not something here about a Django Templates Editor.

If there is, make sure that that's not checked. So, I have just the PyDev for Eclipse. That's all I want at this point. I'm going to go ahead and click Next. So our item details here is correct. We just have PyDef for Eclipse. I'm going to click Next again, and I'm going to accept the terms of the license agreement and click Finish. You notice there's things going on in the background there, and that's fine. And it says, "Installing Software." That could take a moment.

At some point, you'll be asked to accept a certificate from Optana, and you just check it and say Okay, because that is indeed the author of this software. And now it's suggesting that you restart the Eclipse SDK. You really want to do that. It causes problems if you don't. So you're going to go ahead and select Restart Now. Now we have this screen here, which is our Welcome screen for Eclipse. We're just going to go straight to the workbench, which is right up there at the top, and I'm just going to maximize this.

The first thing I'm going to want to do here is select the PyDef perspective. So I'm going to select this little button here, next to where it says Java. I'm going to say Other. And I'm going to select PyDef and Okay. Now you notice we have two of them. I'm going to right-click on the Java one and say Close, because I'm not going to be using Java. I'm just going to scooch this over to the side there a little bit. Now we have our PyDev perspective installed. Before we're done, though, we need to do a few things to complete this installation. We're going to Preferences and, under PyDev, going to select Interpreter Python.

You'll notice that there's nothing here. We need to add the Python Interpreter. So I'm going to press New, and I'm going to select Browse ... going to go to MacIntosh hard drive, and scroll down here to find User -- USR, not Users, plural. USR and Local, and Bin, B-I-N ... and we're going to select Python 3.1. It says that that's an alias, and that is correct.

I'll say Open, and you'll notice that it expands it. It goes through the alias tree and it finds the actual code there, which is exactly what we want it to do. So under Interpreter Name, we're going to type Python 3.1. Select Okay. And so this is exactly the result that you want. If it looks mostly like that, you're good. And just select Okay. And there we have our Python Intepreter. Now, if you're also going to be working in Python two, you might want to also install the Python two Interpreter.

We're not going to be doing that. We're just going to be working in Python 3.1 at this point. So we're done with this part of it. But we're not quite done with the configuration. I'm going to come into the Editor here and I'm going to select the one here that says Hover, and I'm going to uncheck Show Doc Strings. This is a personal choice. I find it really annoying. Some people probably find it helpful, which is why it's there, and it's there by default. But what this is is, whenever you hover your mouse over something in Python, it brings up a little pop-up with the entire documentation for whatever that thing is.

For our purposes, I find it really distracting, so I'm unchecking it. You know that it's there. You can leave it; you can try it both ways and decide what works for you. And then, finally, up here in General and under Editors, and Text Editors, I'm going to check Show Line Numbers. I find that really, really helpful. Now we'll say Okay. It's going to do a bunch of work here. And there we have it. So now we're going to go over here to the Package Explorer, and I'm going to right-click just there inside of it and say New Project.

I'm going to select PyDev and PyDev Project, and say Next. Under Project Name, I'm going to type Python 3 Essential Training. Grammar version is 3.0, and Interpreter is 3.1. And that's our new project, so we'll say Finish. And then I'm going to right-click on the project, and I'm going to say New Folder.

And then, under Advanced, I'm going to click on Advanced. I'm going to say link to alternate folder location. Linked folder. And then, under Browse, I'm going to go to the desktop, and there's our Exercise files. So if you have your Exercise files someplace else, you want to navigate to that. I'll say Open. What this does is, it'll link to the Exercise files, and it'll allow us to use it in place without making a copy of it and moving it to our workspace.

So I'm going to say Finish there. And there we have it. There's our Exercise files. So under Chapter Two, we're just going to double-click on hello.py, and there we have out Hello world. So the entire purpose of Hello world is to check your environment and make sure that you know exactly what you're doing. It's a very, very small, simple piece of code, so that can not be a part of the equation, and yet you can find out, do I have all of the things that I need, and do I know how they work, and are they working properly in order to actually run some Python code inside of this environment? I'm going to click on Run, which is this big green button here, and I'm going to select Python Run in this Run As, and say Okay.

And there we have it. We got our result. This means that Python is installed and it's working, Eclipse is installed and it's working, PyDev is installed and it's working, the Python Interpreter is configured, and the entire environment is working together. So at this point, you now have a working Eclipse environment where you can follow along with the exercises and use it to do your own development.

Find answers to the most frequently asked questions about Python 3 Essential Training .


Expand all | Collapse all
please wait ...
Q: The installation process for the PyDev Eclipse plug-in doesn’t work as described in the videos. What should I do?
A: The version of Eclipse used in the recording of Python 3 Essential Training was Eclipse 3.5.2 (Galileo SR2) and the version of PyDev was 1.5.7. Soon after recording, the Eclipse project was updated to version 3.6, called Helios. As of this writing, the current version of Eclipse is 3.6.1 (Helios SR1).
Around the same time as these updates were being released, the PyDev project was updated as well. As of this writing, the current version of PyDev is 1.6.2. If you are using these most recent versions, the procedure for installing Eclipse itself has not changed, but the process documented in the videos for installing PyDev may not work.

We will be releasing new versions of the videos soon, but the author has posted a document describing the new installation procedure at:
http://python.bw.org/pydev-installation/
Q: How do you install the pydev-interpreter in Eclipse Indigo on Mac OS X Lion? It's significantly different than what's shown in the video "Installing Python 3 and Eclipse for Mac."
A: Since this course was publishing, there have been upgrades to Mac OS X and Eclipse. In this scenario, after installing Python and Eclipse and the Pydev interpreter, there is a different directory to go to when modifying the preferences. As instructed in the movie (at around 6:40) restart Eclipse and then go to Eclipse > Preferences and drill down to Pydev > Interpreter - Python in the sidebar. Click New and in the Select interpreter dialog that opens, click Browse.

The Open dialog box will open, but does not appear to display your hard drive. You must press and hold the Command+Shift+Period keys. This will display all hidden files on your system. Navigate to the new path ~/Library/Frameworks/Python.framework/versions/3.2/bin/python 3.2 and click Open.

You should be able to proceed normally from there.
Q: When I try to install PyDev, it's not showing up in the Available Software window.
A:  This can happen if the pydev.org/updates site is down.
 
    You can manually download PyDev from the pydev.org web site, or from my site here:
 
        http://python.bw.org/
 
    Installation is simple. I've included instructions on my web site above.
 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Python 3 Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK

Upgrade to View Courses Offline

login

With our new Desktop App, Annual Premium Members can download courses for Internet-free viewing.

Upgrade Now

After upgrading, download Desktop App Here.

Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Start your FREE 10-day trial

Begin learning software, business, and creative skills—anytime,
anywhere—with video instruction from recognized industry experts.
lynda.com provides
Unlimited access to over 4,000 courses—more than 100,000 video tutorials
Expert-led instruction
On-the-go learning. Watch from your computer, tablet, or mobile device. Switch back and forth as you choose.
Start Your FREE Trial Now
 

A trusted source for knowledge.

 

We provide training to more than 4 million people, and our members tell us that lynda.com helps them stay ahead of software updates, pick up brand-new skills, switch careers, land promotions, and explore new hobbies. What can we help you do?

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.