The school.
i
This site was made with ❤️ in Westfield, NJ.
Photo by Cision,
Many thanks to my buddy Dionysis for letting me use his beautiful layout.

PyMySQL

What is PyMySQL?

PyMySQL is a database connector for Python. It's a library to enable Python programs to talk to a MySQL server.

Installing PyMySQL

The easiest way to get PyMySQL on your computer is to use pip:

$ pip3 install pymysql

Some of you might be familiar with pip but now we are using pip3 because we are using Python 3.

pip3 comes together with Python 3 but just in case something is not working you can download it as follows:

Mac:

$ sudo easy_install pip3
or if this this doesn't work you can just download get-pip.py and run it, and it will download the appropriate pip for your Python version:
$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python3 get-pip.py

curl gets you the file and then you just run it using python3. sudo runs the command with administrative priviledges.

Windows: Go to https://bootstrap.pypa.io/ and download get-pip.py (Right Click -> Save Link As...). Then simply run it using:

C:\> python3 get-pip.py
Remember to add pip3 to the environmental variables like in this guide.

You can always check the version of pip3 you are using by running:

$ pip3 -V