Note: The Mac Finder application uses the term folder to mean a container of documents and, perhaps, other folders. This document instead uses the equivalent Unix term directory. |
python-3.6.5-macosx10.6.pkg
to your Downloads
directory.Downloads
directory, and double-click on the python-3.6.5-macosx10.6.pkg
file to install Python, Tkinter, and IDLE. Use the default options. (It's OK to delete the python-3.6.5-macosx10.6.pkg
file after the installation is complete.)Terminal.app
followed by the Enter key.To 'issue a command' you should type the command followed by the Enter key. |
python3
command. You should see something like this:>>>
prompt, type import numpy
followed by the Enter
key. If no error messages appear, then your installation of NumPy was successful.>>>
prompt, type import pygame
followed by the Enter
key. If no error messages appear, then your installation of PyGame was successful.>>>
prompt, type exit()
followed by the Enter
key to exit Python.idle3
. If an IDLE window appears, then you have installed IDLE properly. Close the IDLE window.IMPORTANT: When running the Python programs associated with this booksite, do not issue the python command. Instead issue the python3 command. The former command runs the Python 2 compiler/interpreter that is bundled with Mac OS X; the latter command runs the Python 3 compiler/interpreter that you installed by following the instructons on this page. |
/Users/yourusername/Downloads
directory./Users/yourusername/Downloads/introcs-1.0.zip
to unzip the file, thus creating a directory named /Users/yourusername/Downloads/introcs-1.0
. (It's OK to delete the /Users/yourusername/Downloads/introcs-1.0.zip
file after you have unzipped it.)/Users/yourusername
. In the Terminal window issue the cd Downloads
command to change your working directory to /Users/yourusername/Downloads
, and then issue the cd introcs-1.0
command to change your working directory to /Users/yourusername/Downloads/introcs-1.0
. (Incidentally, the cd .
command changes your working directory to the 'parent' of the current working directory.)ls
command to display the names of all files in your working directory. Make sure that a file named setup.py
is in your working directory.python3 setup.py install --user
command. The computer copies the files defining the booksite modules to a directory where Python can find them, and writes status messages to your Terminal window to indicate its progress.python3
command.>>>
prompt, type the statement import stdio
followed by the Enter key. If Python generates no error messages, then you have installed the booksite library properly.>>>
prompt, type exit()
followed by the Enter key to exit Python.idle3
to launch IDLE./Users/yourusername/hello
. Mega man 10 nes rom download.cd hello
command to make the /Users/yourusername/hello
directory your working directory.idle3 &
to launch IDLE. Note the trailing ampersand. The trailing ampersand tells the computer to run the idle3
program in the background, thereby leaving your Terminal application free to handle additional commands while IDLE is running.helloworld.py
in the directory /Users/yourusername/hello
. The file name is case sensitive, so make sure you use all lowercase letters.ls
command to display the names of all files in the working directory. Microsoft office 2016 product key generator online. Confirm that the working directory contains your helloworld.py
file.python3 helloworld.py
command to run your program. If the computer writes 'Hello, World' to the Terminal window, then the execution of your helloworld.py
program was successful. If the computer instead writes error messages, then use IDLE to correct your program, and issue the python3 helloworld.py
command again. Repeat until your program runs successfully. If your program runs successfully the first time you try, then intentionally introduce an error into your program, just so you get some experience with correcting errors./Users/yourusername/Downloads
directory./Users/yourusername/Downloads/introcs-python.zip
to unzip the file, thus creating the /Users/yourusername/Downloads/introcs-python
directory containing the booksite example programs. (It's OK to delete the /Users/yourusername/Downloads/introcs-python.zip
file after you have unzipped it.)cd Downloads
and cd introcs-python
commands to make /Users/yourusername/Downloads/introcs-python
your working directory.ls
command. Confirm that the working directory contains a file named bouncingball.py
.python3 bouncingball.py
command. If Python launches a stddraw window showing an animated bouncing ball, then your download of the booksite example programs was successful./Users/yourusername/Downloads
directory./Users/yourusername/Downloads/introcs-data.zip
to unzip the file, thus creating the /Users/yourusername/Downloads/introcs-data
directory containing the booksite example data files. (It's OK to delete the /Users/yourusername/Downloads/introcs-data.zip
file after you have unzipped it.)/Users/yourusername/Downloads
directory./Users/yourusername/Downloads/stdlib-python.zip
to unzip the file, thus creating the /Users/yourusername/Downloads/stdlib-python
directory containing the booksite library. https://powerfulteen328.weebly.com/gimp-mac-user-manual-download-2016.html. (It's OK to delete the /Users/yourusername/Downloads/stdlib-python.zip
file after you have unzipped it.)ImportError: No module named stdio
when I issue the command python program_that_uses_stdio.py
?python3 program_that_uses_stdio.py
, as described above./Users/yourusername/Downloads
.