Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Installing Python 3 and Eclipse for Mac

From: Python 3 Essential Training

Video: Installing Python 3 and Eclipse for Mac

So now we are going to install Python and Eclipse on a Mac. So this is the Python download page, and you will see I have already downloaded Python 3.1.2 Mac OS X Installer Disk Image. So if you are on a Mac, that's the one that you want to download. If the version number is a little bit higher, if it's a later version, go ahead and install the later version. That should work just fine. Then you want to download from the Eclipse download page, and Eclipse is written in Java, and it's actually a Java development environment, and so you will see that there are a lot of different choices.

Installing Python 3 and Eclipse for Mac

So now we are going to install Python and Eclipse on a Mac. So this is the Python download page, and you will see I have already downloaded Python 3.1.2 Mac OS X Installer Disk Image. So if you are on a Mac, that's the one that you want to download. If the version number is a little bit higher, if it's a later version, go ahead and install the later version. That should work just fine. Then you want to download from the Eclipse download page, and Eclipse is written in Java, and it's actually a Java development environment, and so you will see that there are a lot of different choices.

If you are a Java developer and you want to install one of these other ones, that's fine. Go ahead and do that. For my purposes, I am just getting the Eclipse Classic, because I am really just using it for Python development today. And you'll notice that when I run the mouse over this, it highlights the one for Mac OS X Cocoa, and that's really the one that you want to install. So I have already downloaded that as well, and here is my Downloads folder, and I have got the Eclipse downloaded, and I have the Python downloaded. So go ahead and close the browser, and we are going to start by installing Python.

So I will double-click on the installer, and I will double-click on the Python.mpkg, and I will say Continue, and Continue, and Continue, and Agree, and Install. I am going to install this in default location. Type in my Password. Mac OS X already comes with Python installed, but it's Python 2, and so you really need to install Python 3 for this course, because this course is about Python 3. That installation is done, and I can unmount this, and I just want to go ahead and go out to my Applications folder, and then I will find Python 3.1 folder, and in there, you'll find IDLE. And I am going to drag that to my Doc because we are going to be using that.

I will go ahead and we'll open it, so it's Python 3.1.2, and that's what we are looking for. So Python is installed and working on this Mac. I will Quit IDLE, and we are going to go ahead now and install Eclipse. So I am going to double-click on the Eclipse installer, and this is going to unarchive it. And it will unarchive the tar file, which is inside of the gz file. And I have got this folder, and all I need to do with at this point is drag this whole folder to my applications folder and I come in here, and I am going to find the folder called Eclipse, and inside of that folder there is the Eclipse application. I am going to drag that to my dock and run it.

So you go ahead and open that. Now there are a few things we need to do to configure Eclipse. First thing, we are going to select a workspace. I am going to allow the default; you are welcome to use whatever folder works for you. I am going to select the check box to use it as a default, so it doesn't ask me again. Now before I do anything else, when Eclipse starts up, under the Help menu, I am going to go to Install New Software, and I am going to select this link. This is Available Software Sites, and I am going to add one, and this is for Pydev, and the URL is pydev.org/updates, with an s at the end.

Say OK, and we see that gets added there, and I say OK, and then all I need to do is select that is go up here and type Pydev, and just the first couple of letters, and I will get this here, and I can double-click on that, Pending, and it finds Pydev. So you want to check Pydev. You don't need to check the Mylyn integration, unless you know what that is, and you are going to be using that. And I will select Next, PyDev for Eclipse, and Next. And I want to accept the terms of the license and Finish, and here we go.

This should take just a moment. At the security warning, you want to say OK, and it is strongly recommended that you restart Eclipse. There is no reason not to. So I am just going to select Yes, and Eclipse will restart. So now I am going to go ahead, and I am going to go to the Workbench. That's this icon over here at the right, and I am going to maximize this on my workspace. You will see over here we have Java selected. I am going to select Other and Pydev and OK, and because I am not going to be doing any Java development, I am just going to right-click on Java and select Close.

Then I can move this over, and there is my Pydev Workspace. Now before we get started, we need to go into Preferences, and under Pydev and Interpreter Python, we need to add our Python Interpreter, and this is so Pydev knows where to look for Libraries, what sort of Grammar to use, things like that. So I am going to go ahead and add it. I am going. It's under browse user > local > bin > python 3.1, and that's an alias, and it's supposed to be. And so when I say OK, it actually goes and it finds what the alias was pointing at.

Under interpreter name, I am just going to type Python 3.1. I am going to say OK, and it will say OK. Now if you are also going to be doing Python 2 development, you might want to add that interpreter as well. I know I am not going to be, so I am going to leave it like this. So now I say OK, and it goes and it finds all of the frameworks, and it finds all the libraries, and it does all of this stuff, and now that's installed. So we are getting closer. At this point, we want to go back into the Preferences, and under Pydev and under Editor, see this thing that says Hover, and see it's a Show docstrings? I uncheck that. I find that very distracting.

It's up to you if you want to uncheck that or not. What it does is whenever you hover over an object in Python, it will show you the entire documentation, and it will pop up for that object. I am sure some people find that very helpful. I find that it gets in the way, so I uncheck that. Also, up here in General and under Editors and Text Editors, I want to check, Show line numbers. I find that very useful, and I think you will too. So now we say OK. Over here in the Pydev Package Explorer, right-click and say New > Project, and select Pydev and select Pydev Project and Next.

And under Interpreter, you want to select the Python 3.1 Interpreter, and under Grammar Version, you want to select 3.0, and make sure it says Python for the project type, and type in the name of project. I am going to call this Python 3 Essential Training, and select Finish. Now I have this project here, and I want to right-click on the project and say, New > Folder, and the parent folder will already be selected as Python 3 Essential Training, and then select the Advanced button and select Link to folder in the system.

Now I am going to select Browse, and on my desktop, I have my Exercise Files folder. So you want to select that wherever it is you put yours. I find the desktop to be very convenient for this. I am going to press Open. And so what this will do is this will add my Exercise folders to this Project folder without actually copying the folder. And so it will be just linked to the folder, and it will use it in place without making another copy of it. So I am going to say Finish, and there it is.

Now just open up Chapter 02 and double- click on hello.py. And the first time you open something up after just installing Eclipse and Pydev and everything, it might take in a moment, and then there it is. We have our Hello, World! It's a very simple Python program. The whole purpose of this program is just as an exercise in getting your development environment running, so it's exactly what it is designed for. So when I select Run, it will ask me to Run As, and I will select Python Run, and say OK, and there we have it. There is our result: Hello, World! So this tells us that Python is installed, that Eclipse is installed, that Pydev is installed, Python Interpreter is configured within Eclipse and Pydev, and the entire environment is running.

So now you have a working Eclipse environment where you can follow along with the exercises and do your own Python development.

Show transcript

This video is part of

Image for Python 3 Essential Training
Python 3 Essential Training

87 video lessons · 38722 viewers

Bill Weinman
Author

 
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

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
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.

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
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?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

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:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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.