Ubuntu 14.04 Install mysqlclient for Python2.7

The default version of Python in the Ubuntu14.04 system is 2.7.6

After pip is upgraded, some python packages are installed through pip and the following two warnings (SNIMissingWarning and InsecurePlatformWarning) are reported. In fact, it is an SSL problem. urllib3 requires pyopenssl 

1. First install mysql server, see: http://rule.iteye.com/admin/blogs/2276278

2. Install dependencies

sudo apt-get install python-dev libmysqlclient-dev

3. Install the mysqlclient driver

sudo pip install mysqlclient

Report SNIMissingWarning and InsecurePlatformWarning alarms

4. Solve these two alarm problems by installing dependency packages such as pyopenssl

sudo apt-get install libffi-dev libssl-dev

pip install cryptography

pip install pyopenssl ndg-httpsclient pyasn1

Reference: https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326818122&siteId=291194637