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 having trouble getting the different connectors to work. I have always 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 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: http://dev.mysql.com/downloads/connector/python/

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

Help please :-) Thank you. '

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

        asked Jul 31 '15 at 14:11    
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 https://github.com/mysql/mysql-connector-python.git
$ cd mysql-connector-python
$ python ./setup.py build
$ sudo python ./setup.py install ... >>> import mysql.connector as msc
>>> msc.__version__
'2.1.3'
>>>

How do you install mysql-connector-python (development version) through pip?的更多相关文章

  1. Installing MySQL Connector/Python using pip v1.5

    The latest pip versions will fail on you when the packages it needs to install are not hosted on PyP ...

  2. MySQL Connector/Python 安装、测试

         安装Connector/Python: # wget http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-pyth ...

  3. Snippet: Fetching results after calling stored procedures using MySQL Connector/Python

    https://geert.vanderkelen.org/2014/results-after-procedure-call/ Problem Using MySQL Connector/Pytho ...

  4. MySQL Connector/Python 接口 (一)

    这里仅介绍 MySQL 官方开发的 Python 接口,参见这里: https://dev.mysql.com/doc/connector-python/en/ Chapter 1 Introduct ...

  5. MySQL Connector/Python 接口 (二)

    连接数据库 本文参见这里,示例如何连接MySQL 数据库. import mysql.connector from mysql.connector import errorcode # 连接数据库需要 ...

  6. MySQL Connector/Python 接口 (三)

    本文参见这里. 使用缓冲的 cursor,下例给从2000年加入公司并且还在公司的员工薪水从明天起加15% from __future__ import print_function from dec ...

  7. How to Access MySQL with Python Version 3.4

    http://askubuntu.com/questions/630728/how-to-access-mysql-with-python-version-3-4 How to Access MySQ ...

  8. python使用mysql的三个模块:mysql.connector、sqlalchemy、MySQLdb

    在python中使用mysql其实很简单,只要先安装对应的模块即可,那么对应的模块都有什么?官方也没指定也没提供,pcat就推荐自己遇到的3个模块:mysql.connector.sqlalchemy ...

  9. MySQL:Download Connector/Python

    MySQL Connector / Python是用于Python平台和开发的标准化数据库驱动程序. 此外,MySQL Connector / Python 8.0支持使用MySQL Server 8 ...

随机推荐

  1. [_CN] Eclipse精要与高级开发技术 note

    一 eclipse是基于java的 ide ,但根据其体系结构,开发插件,也可拓展到其他语言———————— 尽管如此,但还是很少听说用eclipse来写php或者c的 跨os 三个项目:eclips ...

  2. WebBrowser设置Cookie

    在winform里面经常会用到WebBrowser,这是一个难点就是如何设置cookies,注意,Docment对象是只读的,所以WebBrowser.Docment.cookie也就只有get方法, ...

  3. 如何使用ITEXTSHARP将HTML代码字符串写进PDF

    原文 如何使用ITEXTSHARP将HTML代码字符串写进PDF itextsharp包括一个简单的类,可以用来根据html代码或字符串创建pdf文件.使用此类,你可以使用短短几行代码,就将 HTML ...

  4. c#将list集合转换为datatable的简单办法

    public static class ExtensionMethods        {        /// <summary>        /// 将List转换成DataTabl ...

  5. HTML5横竖屏提示

    HTML代码: <div class="screen-prompt"></div> CSS判断代码: /*横竖屏提示*/ @media screen and ...

  6. java.util.Scanner简单应用

    import java.util.Scanner; import java.io.*; public class FileScannerTest{ public static void main(St ...

  7. 使用ExifInterface设置Datetime发生的问题

    最近在弄一个Android小程序,需要把图像的生成时间设置到Exif的Datetime,用ExifInterface.setAttribute(ExifInterface.TAG_DATETIME,& ...

  8. Anti-If: The missing patterns--转

    原文地址:http://code.joejag.com/2016/anti-if-the-missing-patterns.html Around 10 years ago I encountered ...

  9. 算法设计和数据结构学习_5(BST&AVL&红黑树简单介绍)

    前言: 节主要是给出BST,AVL和红黑树的C++代码,方便自己以后的查阅,其代码依旧是data structures and algorithm analysis in c++ (second ed ...

  10. Azure ARM (3) ARM支持的服务类型

    <Windows Azure Platform 系列文章目录> 我们在使用ARM创建资源的时候,首先要确认哪些Azure服务,支持ARM模式. 具体内容,我们可以参考连接:https:// ...