-
Couldn't load subscription status.
- Fork 45
Install on Windows
Dāvis edited this page Jul 17, 2014
·
5 revisions
- Python 3
- MySQL Connector/C, it must be 32-bit, because there's no 64-bit Python for Windows.
- Visual Studio for Windows Desktop (it can be free Express version) or Windows SDK for Windows 7 (or any other compiler, ie. MinGW, but that isn't covered here)
- MySQL for Python 3
- Install Python 3
- Optionally add python to PATH or if you've multiple versions you can set it temporarily for that command-line. Also alternatively you can write full path.
- Check if
pythonworks (Note.python(python.exe) refers to Python 3) - Install MySQL Connector/C.
- Install Visual Studio for Windows Desktop
- Download and extract MySQL for Python 3
- Open Developer Command Prompt
- If you haven't put python in PATH you can temporary set it with
set PATH=location\to\python\;%PATH%(or you can editwin_build.cmdwith full path to python) - Now finally install it by launching
win_buildin opened command-line. - You can test if it was successfully installed by opening python and typing
import MySQLdb(it shouldn't say anything if import was successful)
- start MySQL server (if it's not running)
- create
test.pywith contents from [Usage example](Usage example) - edit settings (root password, etc) accordingly
- try it with
python test.py