mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2026-03-13 08:00:02 +08:00
README: Add how to install/build
This commit is contained in:
25
README.md
25
README.md
@@ -1,5 +1,4 @@
|
||||
mysqlclient
|
||||
===========
|
||||
# mysqlclient
|
||||
|
||||
[](http://travis-ci.org/PyMySQL/mysqlclient-python)
|
||||
|
||||
@@ -8,11 +7,29 @@ This is a fork of [MySQLdb1](https://github.com/farcepest/MySQLdb1).
|
||||
This project adds Python 3 support and bug fixes.
|
||||
I hope this fork is merged back to MySQLdb1 like distribute was merged back to setuptools.
|
||||
|
||||
Prerequisites for Installing
|
||||
----------------------------
|
||||
## Install
|
||||
|
||||
### Prerequisites
|
||||
|
||||
You may need to install the Python and MySQL development headers and libraries like so:
|
||||
|
||||
`sudo apt-get install python-dev libmysqlclient-dev` # Debian / Ubuntu
|
||||
|
||||
`sudo yum install python-devel mysql-devel` # Red Hat / CentOS
|
||||
|
||||
On Windows, there are binary wheel you can install without MySQLConnector/C or MSVC.
|
||||
|
||||
|
||||
### Install from PyPI
|
||||
|
||||
`pip install mysqlclient`
|
||||
|
||||
NOTE: Wheels for Windows may be not released with source package. You should pin version
|
||||
in your `requirements.txt` to avoid trying install source newest pacakge.
|
||||
|
||||
|
||||
### Install from source
|
||||
|
||||
1. Download source by `git clone` or [zipfile](https://github.com/PyMySQL/mysqlclient-python/archive/master.zip).
|
||||
2. Customize `site.cfg`
|
||||
3. `python setup.py install`
|
||||
|
||||
Reference in New Issue
Block a user