Go to https://www.python.org/downloads (the downloads page detects your operating system and suggests the Windows version).
Click Download Python 3.4.3 (or the newest version of Python 3—it may have been updated since the time of this book’s publication).
Click “Windows x86 MSI installer” to save or run the MSI installer.
Double-click the downloaded python-3.4.3.msi installer to open the Python Installer.
Select “Install for all users” or “Install just for me” and then click Next.
Use the default destination directory (C:\Python34\), and click Next.
For all of the remaining screens, click Next without changing the default values.
Python should now be installed.
Once Python is installed:
Click Start.
Click Control Panel.
Click System and Security.
Click System.
Click “Advanced system settings.”
Click the Advanced tab.
Click the Environment Variables option.
Under the “System variables” option, scroll down to and click on the Path variable.
Click Edit.
In the “Variable value” field, check to make sure C:\Python34\ is included in the list.
If it is not in the list, scroll to the end of the list and type “;C:\Python34\” at the end of the list to add the path to the list (the semicolon is used to separate individual paths).
Click OK to save your changes to the Path system variable.
Click OK to exit the Environment Variables window.
Click OK to exit the System Properties window.
Now click File Explorer.
Double-click the C: drive.
Double-click the Python34 folder.
Double-click the python application.
If the Python Shell window opens, then you are good to go.
Click iTerm to open a Terminal window.
Type the following and then hit Enter:
which python
If you see a path like /usr/bin/python or /usr/local/bin/python displayed in the Terminal window, then Python is already installed and you are good to go.
If you do not see a path like /usr/bin/python or /usr/local/bin/python, then follow these instructions to install Python:
Go to https://www.python.org/downloads (the downloads page detects your operating system and suggests the Mac OS version).
Click Download Python 3.4.3 (or the newest version of Python 3—it may have been updated since the time of this book’s publication).
Click Save File to download python-3.4.3-macosx10.6.pkg.
Double-click python-3.4.3-macosx10.6.pkg to open the Python Installer.
Click Continue to move past the Welcome screen.
Click Continue to move past the Important Information screen.
Click Agree/Continue to move past the Software License Agreement screen.
Click Install to install Python in the default destination directory.
For all of the remaining screens, click Continue without changing the default values.
Python should now be installed.
Click Applications to open your applications.
Click iTerm to open a Terminal window.
Type the following and then hit Enter:
which python
You should now see a path like /usr/bin/python or /usr/local/bin/python, indicating that Python has been installed and you are good to go.
Before completing these steps, you first need to install Python 3.
Open a Command Prompt window.
Type the following and then hit Enter:
python -m pip install xlrd
After you hit Enter, you should see output printed in the Command Prompt window indicating that the xlrd package has been installed.
To confirm that xlrd installed properly:
Click File Explorer.
Double-click the C: drive.
Double-click the Python34 folder.
Double-click the python application.
When the Python Shell window opens, type the following and hit Enter:
import xlrd
If you don’t receive any error messages, then xlrd installed properly and you are good to go.
Click the green Downloads button to download the latest version of xlrd.
Right-click on the downloaded application and select “Show in folder.”
Unzip the folder in your Downloads folder.
Double-click the unzipped xlrd-0.9.3.tar folder to enter the folder.
Click on and copy the unzipped xlrd-0.9.3 folder.
Go back out to your Downloads folder and paste the unzipped xlrd-0.9.3 folder into that folder.
Open a Command Prompt window.
To move into your Downloads folder, type the following and hit Enter:
cd Downloads
To move into the unzipped xlrd-0.9.3 folder, type the following and hit Enter:
cd xlrd-0.9.3
Now that you are inside the xlrd-0.9.3 folder, type the following and hit Enter:
python setup.py install
After you hit Enter, you should see output printed in the Command Prompt window indicating that the xlrd package has been installed.
To confirm that xlrd installed properly:
Click File Explorer.
Double-click the C: drive.
Double-click the Python34 folder.
Double-click the python application.
When the Python Shell window opens, type the following and hit Enter:
import xlrd
If you don’t receive any error messages, then xlrd installed properly and you are good to go.
Before completing these steps, you first need to install Python 3.
Click Applications to open your applications.
Click iTerm to open a Terminal window.
Type the following and then hit Enter:
python -m pip install xlrd
After you hit Enter, you should see output printed in the Terminal window indicating that the xlrd package has been installed.
If instead you receive an error, try typing the following and then hitting Enter:
sudo python -m pip install xlrd
You’ll be asked to enter the password you use to log in to your computer. Type your password (it won’t appear on the screen) and then hit Enter.
To confirm that xlrd installed properly:
Click Applications to open your applications.
Click iTerm to open a Terminal window.
To open the Python interpreter inside the Terminal window, type the following and then hit Enter:
python
Once the Python interpreter opens, type the following and then hit Enter:
import xlrd
If you don’t receive any error messages, then xlrd installed properly and you are good to go.
Click the green Downloads button to move down to the downloadable files.
Click “xlrd-0.9.3.tar.gz” (or the newest version—it may have been updated since the time of publication) to save the zipped file in your Downloads folder.
Double-click the downloaded file to unzip it in the Downloads folder.
If you have any trouble unzipping the file you can also unzip it from the Terminal window. Type the following in a Terminal window and then hit Enter to move into the Downloads folder:
cd Downloads
Next, to unzip the file, type the following and then hit Enter:
tar -zxvf xlrd-0.9.3.tar.gz
Now the unzipped folder xlrd-0.9.3 should be in your Downloads folder.
Click Applications to open your applications.
Click iTerm to open a Terminal window.
To move into your Downloads folder, type the following and hit Enter:
cd Downloads/
To move into the unzipped xlrd-0.9.3 folder, type the following and then hit Enter:
cd xlrd-0.9.3/
Now that you are inside the xlrd-0.9.3 folder, type the following and then hit Enter:
python setup.py install
After you hit Enter, you should see output printed in the Terminal window indicating that the xlrd package has been installed.
If instead you receive an error, try typing the following and then hitting Enter:
sudo python setup.py install
You’ll be asked to enter the password you use to log in to your computer. Type your password (it won’t appear on the screen) and then hit Enter.
To confirm that xlrd installed properly:
Click Applications to open your applications.
Click iTerm to open a Terminal window.
To open the Python interpreter inside the Terminal window, type the following and then hit Enter:
python
Once the Python interpreter opens, type the following and then hit Enter:
import xlrd
If you don’t receive any error messages, then xlrd installed properly and you are good to go.
Click MySQL Community Server.
Click the Download button next to “Mac OS X 10.11 (x86, 64-bit), DMG Archive.”
Be sure to select the .dmg archive, which comes with its own installer.
Click “No thanks, just start my download.”
When the download is finished, click on the downloaded installer.
Follow the installer’s instructions.
I won’t lie to you: this can be hairy. The MySQL Reference Manual has a section on installing that will get you a good part of the way there, but you may well need to Google an error message or two along the way.
Before completing these steps, you’ll probably first need to download MySQL; the installer for the Python packages will check for MySQL’s configuration files as it’s setting up and will fail if it doesn’t find MySQL.
Before completing these steps, you first need to install Python 3.
Open a Command Prompt window.
Type the following and then hit Enter:
python -m pip install mysqlclient
After you hit Enter, you should see output printed in the Command Prompt window indicating that the mysqlclient package has been installed.
To confirm that mysqlclient installed properly:
Click File Explorer.
Double-click the C: drive.
Double-click the Python34 folder.
Double-click the python application.
When the Python Shell window opens, type the following and then hit Enter:
import MySQLdb
If you don’t receive any error messages, then mysqlclient installed properly and you are good to go.
Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient.
Click the link for the version of mysqlclient that corresponds to your version of Python (i.e., 3.x or 2.x) and your operating system (i.e., 32-bit or 64-bit).
Save the file in your Downloads folder.
You can determine the version you need by opening a Command Prompt window, typing python and hitting Enter to enter the Python interpreter, and reviewing the header information at the top of the screen. You should see details like “Python 3.4.3 (32-bit),” which indicates that you need to select the link for 32-bit Python 3.4. At the time of this writing, the link is: mysqlclient-1.3.6-cp34-none-win32.whl. If you have a different version of Python or a different type of operating system, then you need to select the link that corresponds to your information.
Open a Command Prompt window.
Type the following and then hit Enter:
cd Downloads
Type the following (substituting a different filename if necessary) and then hit Enter:
python -m pip install mysqlclient-1.3.6-cp34-none-win32.whl
After you hit Enter, you should see output printed in the Command Prompt window indicating that the mysqlclient package has been installed.
To confirm that mysqlclient installed properly:
Click File Explorer.
Double-click the C: drive.
Double-click the Python34 folder.
Double-click the python application.
When the Python Shell window opens, type the following and then hit Enter:
import mysqlclient
If you don’t receive any error messages, then mysqlclient installed properly and you are good to go.
Before completing these steps, you first need to install Python 3.
Click Applications to open your applications.
Click iTerm to open a Terminal window.
Type the following and then hit Enter:
python -m pip install mysqlclient
After you hit Enter, you should see output printed in the Terminal window indicating that the mysqlclient package has been installed.
If instead you receive an error, try typing the following and then hitting Enter:
sudo python -m pip install mysqlclient
You’ll be asked to enter the password you use to log in to your computer. Type your password (it won’t appear on the screen) and then hit Enter.
To confirm that mysqlclient installed properly:
Click Applications to open your applications.
Click iTerm to open a Terminal window.
To open the Python interpreter inside the Terminal window, type the following and then hit Enter:
python
Once the Python interpreter opens, type the following and then hit Enter:
import mysqlclient
If you don’t receive any error messages, then mysqlclient installed properly and you are good to go.
Click the green Downloads button to move down to the downloadable files.
Click “mysqlclient-1.3.6.tar.gz” (or the newest version—it may have been updated since the time of publication) to save the zipped file in your Downloads folder.
Double-click the downloaded file to unzip it in the Downloads folder.
If you have any trouble unzipping the file, you can also unzip it from the Terminal window. Type the following in a Terminal window and then hit Enter to move into the Downloads folder:
cd Downloads
Next, to unzip the file, type the following and hit Enter:
tar -zxvf mysqlclient-1.3.6.tar.gz
Now the unzipped folder mysqlclient-1.3.6 should be in your Downloads folder.
Click Applications to open your applications.
Click iTerm to open a Terminal window.
To move into your Downloads folder, type the following and hit Enter:
cd Downloads/
To move into the unzipped mysqlclient-1.3.6 folder, type the following and then hit Enter:
cd mysqlclient-1.3.6/
Now that you are inside the mysqlclient-1.3.6 folder, type the following and then hit Enter:
python setup.py install
After you hit Enter, you should see output printed in the Terminal window indicating that the mysqlclient package has been installed.
If instead you receive an error, try typing the following and then hitting Enter:
sudo python setup.py install
You’ll be asked to enter the password you use to log in to your computer. Type your password (it won’t appear on the screen) and then hit Enter.
To confirm that mysqlclient installed properly:
Click Applications to open your applications.
Click iTerm to open a Terminal window.
To open the Python interpreter inside the Terminal window, type the following and then hit Enter:
python
Once the Python interpreter opens, type the following and then hit Enter:
import mysqlclient
If you don’t receive any error messages, then mysqlclient installed properly and you are good to go.