How do you install mysql-connector-python (development version) through pip ?, Pipmysqlconnector

Source: Internet
Author: User
Tags python mysql virtualenv

How do you install mysql-connector-python (development version) through pip ?, Pipmysqlconnector

12 down votefavorite8



I have a virtualenv in which I am running Django 1.8 with Python 3.4

I am trying to get support for MySQL however I am having trouble getting the different connectors to work. I have always used mysql-connector-python with django 1.7 and wo'd like to continue using it.

The development version of mysql-connector-python (2.1.2) seems to have support for Django 1.8 now.

How do I install the development version using pip install (within my virtualenv )? I have tried running the following command:

pip install mysql-connector-python==2.1.2 --allow-external mysql-connector-python

But the 2.1.2 developer version is not available there:

could not find a version that satisfies the requirement mysql-connector-python==2.1.2 (from versions: 1.1.4, 1.1.5, 1.1.6, 1.2.2, 1.2.3, 2.0.1, 2.0.2, 2.0.3, 2.0.4)  Some insecure and unverifiable files were ignored (use --allow-unverified mysql-connector-python to allow).No matching distribution found for mysql-connector-python==2.1.2

I have tried downloading the file directly from:

... But for some reason after installation the connector is not available within my virtualenv

Help please :-) Thank you .'

EDIT:I have triedpip install mysql-pythonBut it is not supported by Python 3.4.

Python mysql django
Share | improve this question Edited Jul 31 '15 Asked Jul 31 '15 at Aivoric 3962515
Add a comment |
1 Answer 1 active oldest votes
Up vote27down vote

I agree, the debian packages appear to be broken for at least Ubuntu 14.04.

The apt-get version and the pip version do not include the 2.1.x releases.

To get it done, I had to grab the source:

$  git clone$  cd mysql-connector-python$  python ./ build$  sudo python ./ install...>>> import mysql.connector as msc>>> msc.__version__'2.1.3'>>>

Related Article

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: 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.