Install mysql-connector-python and pythonmysqlconnein python configuration Development Environment

Source: Internet
Author: User

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-pythonBut 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,sudoSwitchrootIf 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.gitDownload 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..dmgInstall 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'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.