Install mysql-connector-python and pythonmysqlconnein python configuration Development Environment
Day1:
Today, I started to build a python-based Blog system with Mr. Liao Xuefeng. On the first day, I configured the python development environment. Refer to the Website: practice;
Local Environment: MacOS 10.12
Problem: problems encountered during mysql-connector-python Installation
Recommended installation methods:$ easy_install mysql-connector-python
But the following problems occur during installation:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-18192.pth'
Think it is a permission issue,sudo
Switchroot
If you perform the same operation under the permission, the following error occurs:
Searching for mysql-connector-pythonReading https://pypi.python.org/simple/mysql-connector-python/No local packages or download links found for mysql-connector-pythonerror: Could not find suitable distribution for Requirement.parse('mysql-connector-python')
I tried to install mysql-connector-python on the blog Mac platform.git
Download the relevant source code and compile and install it, but it still fails!
Solution
Finally, you cannot download the latest version from the mysql-connector-python download site..dmg
Install the installation package. The installed version is:mysql-connector-python-2.1.4-osx10.11.dmg
Installation successful test
~ python>>> import mysql.connector as ms>>> msc.__version__'2.1.4'