How does you install Mysql-connector-python (development version) through PIP?

Source: Internet
Author: User
Tags python mysql virtualenv git clone

12down Votefavorite 8

http://stackoverflow.com/questions/31748278/ how-do-you-install-mysql-connector-python-development-version-through-pip/34027037#34027037

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 have trouble getting the different connectors to work. I have all used Mysql-connector-python with Django 1.7 and would like to continue using it.

The development version of Mysql-connector-python (2.1.2) seems to has 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 was not available there:

CouldNotFind a version that satisfies the requirement MySQL-Connector-Python==2.1.2 (FromVersions: 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.04)  some insecure and unverifiable files were ignored  (use --allow-unverified mysql< Span class= "pun" >-connector-python to allow no matching distribution found for Mysql-connector-python< Span class= "pun" >==2.1. 2                   

I have tried downloading the file directly from:http://dev.mysql.com/downloads/connector/python/

Some reason after installation the connector was not available within my virtualenv

Help:-) Thank. ‘

EDIT: I had tried but it was not pip install mysql-python supported by Python 3.4

Python MySQL Django
share|improve this question edited jul "@ 15:08    &NBSP;&NBSP;&NBSP;&NBSP,         asked Span class= "Relativetime" title= "2015-07-31 14:11:52z" >jul "at 14:11          aivoric        3962515        
Add a Comment |
1 Answer1Active oldest votes
Up vote27down vote

I agree, the Debian packages appear to being 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 do, I had to grab the source:

$ git clone https://github.com/mysql/mysql-connector-python.git$ cd mysql-< Span class= "PLN" >connector-python$ python ./ setup../setup. PY Install ... >>> import. Connector as Msc>>> Msc__version__ ' 2.1.3 ' >>>   

How does you install Mysql-connector-python (development version) through PIP?

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