一、MySQL Connector/Python 2.2.3 的变化

之前 mysql 官方说MySQL Connector/Python 是纯python语言写的,但是呢! 这个问题在2.2.3中变天了;

以下是MySQL Connector/Python 2.2.3 是变更记录

Changes in MySQL Connector/Python 2.2.3 (2017-03-22)

Functionality Added or Changed

Bugs Fixed

Functionality Added or Changed

The pure Python implemention of Protobuf has been replaced by a C++ extension. This enables Connector/Python to support Python 2 and 3 as well as Protobuf 2 and 3. (Bug #25209469)

Connector/Python now supports IPv6 target hosts in X DevAPI connection strings.

二、它带来了什么问题

pip3. install mysql-connector # 安装不上mysql-connector 了 我的mac上没有这个依赖
Collecting mysql-connector
Using cached mysql-connector-2.2..zip
Installing collected packages: mysql-connector
Running setup.py install for mysql-connector ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3. -u -c "import setuptools, tokenize;__file__='/private/var/folders/bt/zvnw3lzj0j138lgvj21x728h0000gn/T/pip-build-5ozhefl4/mysql-connector/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/bt/zvnw3lzj0j138lgvj21x728h0000gn/T/pip-hx174vot-record/install-record.txt --single-version-externally-managed --compile:
running install
Not Installing MySQL C Extension
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.6
creating build/lib.macosx-10.6-intel-3.6/mysql
copying lib/mysql/__init__.py -> build/lib.macosx-10.6-intel-3.6/mysql
creating build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/__init__.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/abstracts.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/authentication.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/catch23.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/charsets.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/connection.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/connection_cext.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/constants.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/conversion.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/cursor.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/cursor_cext.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/custom_types.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/dbapi.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/errorcode.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/errors.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/network.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/optionfiles.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/pooling.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/protocol.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/utils.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
copying lib/mysql/connector/version.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector
creating build/lib.macosx-10.6-intel-3.6/mysql/connector/locales
copying lib/mysql/connector/locales/__init__.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/locales
creating build/lib.macosx-10.6-intel-3.6/mysql/connector/locales/eng
copying lib/mysql/connector/locales/eng/__init__.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/locales/eng
copying lib/mysql/connector/locales/eng/client_error.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/locales/eng
creating build/lib.macosx-10.6-intel-3.6/mysql/connector/django
copying lib/mysql/connector/django/__init__.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/django
copying lib/mysql/connector/django/base.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/django
copying lib/mysql/connector/django/client.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/django
copying lib/mysql/connector/django/compiler.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/django
copying lib/mysql/connector/django/creation.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/django
copying lib/mysql/connector/django/features.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/django
copying lib/mysql/connector/django/introspection.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/django
copying lib/mysql/connector/django/operations.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/django
copying lib/mysql/connector/django/schema.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/django
copying lib/mysql/connector/django/validation.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/django
creating build/lib.macosx-10.6-intel-3.6/mysql/connector/fabric
copying lib/mysql/connector/fabric/__init__.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/fabric
copying lib/mysql/connector/fabric/balancing.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/fabric
copying lib/mysql/connector/fabric/caching.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/fabric
copying lib/mysql/connector/fabric/connection.py -> build/lib.macosx-10.6-intel-3.6/mysql/connector/fabric
creating build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/__init__.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/authentication.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/charsets.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/compat.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/connection.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/constants.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/crud.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/dbdoc.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/errorcode.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/errors.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/expr.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/protobuf.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/protocol.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/result.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
copying lib/mysqlx/statement.py -> build/lib.macosx-10.6-intel-3.6/mysqlx
creating build/lib.macosx-10.6-intel-3.6/mysqlx/locales
copying lib/mysqlx/locales/__init__.py -> build/lib.macosx-10.6-intel-3.6/mysqlx/locales
creating build/lib.macosx-10.6-intel-3.6/mysqlx/locales/eng
copying lib/mysqlx/locales/eng/__init__.py -> build/lib.macosx-10.6-intel-3.6/mysqlx/locales/eng
copying lib/mysqlx/locales/eng/client_error.py -> build/lib.macosx-10.6-intel-3.6/mysqlx/locales/eng
running build_ext
# Python architecture: -bit
# Python ARCH_64BIT: True
Unable to find Protobuf include directory. ----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/bt/zvnw3lzj0j138lgvj21x728h0000gn/T/pip-build-5ozhefl4/mysql-connector/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/bt/zvnw3lzj0j138lgvj21x728h0000gn/T/pip-hx174vot-record/install-record.txt --single-version-externally-managed --compile" failed with error code in /private/var/folders/bt/zvnw3lzj0j138lgvj21x728h0000gn/T/pip-build-5ozhefl4/mysql-connector/

三、不行啦、我还是安装老版本的吧

pip3. install mysql-connector==2.1.
Collecting mysql-connector==2.1.
Downloading mysql-connector-2.1..zip (355kB)
% |████████████████████████████████| 358kB .2MB/s
Installing collected packages: mysql-connector
Running setup.py install for mysql-connector ... done
Successfully installed mysql-connector-2.1.

四、怎么样才能安装上最新版呢?

----

学习交流

pip install mysql-connector 安装出错的更多相关文章

  1. 使用pip install mysqlclient命令安装mysqlclient失败?(基于Python)

    我们使用Django.flask等来操作MySQL,实际上底层还是通过Python来操作的.因此我们想要用Django来操作MySQL,首先还是需要安装一个驱动程序.在Python3中,驱动程序有多种 ...

  2. 当pip install不能正确安装的时候,try easy_install

    当pip install不能正确安装的时候,try easy_install 重复试了几次pip install -r requirements.txt,都在安装pillow的时候失败了,想找这个枕头 ...

  3. 使用pip install 或者easy_install安装Python的各种包出现cc failed with exit status 1

    *:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...

  4. 用pip install升级已安装的包的附加包, 以tabulate包为例

    用pip install升级已安装的附加包, 以tabulate包为例 去pypi官网查看tabulate包的介绍, 发现tabulate 0.7.6才开始支持宽字符的美化打印. 而且还需要安装它的附 ...

  5. python导入模块报错:ImportError: No module named mysql.connector(安装 mysql)

    python的版本是 $ python --version Python 2.7.12 报错代码如下 import mysql.connector 报错信息是 ImportError: No modu ...

  6. [py]py3/pip/virtualenv/mysql环境安装

    Traceback (most recent call last):是什么意思? 追踪(最后调用) pip.ini添加 https://www.cnblogs.com/lsdb/p/9188204.h ...

  7. Python: Win7下使用 pip install lxml 无法安装lxml?

    1.在网址 http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml 下,搜索lxml,下载Python对应的lxml版本.如下图: 2.打开cmd,进入到lxm ...

  8. 用pip install不能成功安装时的处理方法

    解决办法: pip install pymysql -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

  9. win 8 pip install 或者 pycharm 安装 paramiko 报错

    这是安装时报错的最后几行 creating build\temp.win-amd64-3.5\Release\build creating build\temp.win-amd64-3.5\Relea ...

  10. Python:安装MYSQL Connector

    在Python中安装MySQL Connector有如下三种方法: 1.直接安装客户端[建议使用] pip install mysqlclient 2.安装mysql连接器 pip install - ...

随机推荐

  1. [Asp.net]使用flexpaper+swftools大文件分页转换实现在线预览

    引言 之前总结了在线预览几种常见解决方案,可以戳这里: http://www.cnblogs.com/wolf-sun/p/3569960.html http://www.cnblogs.com/wo ...

  2. ANDROID打包错误ERROR:EXECUTION FAILED FOR TASK ´:APP:LINTVITALRELEASE´.

    来自:http://dditblog.com/itshare_657.html 今天修改之前的项目之后.准备打包的时候.一起打包不了.一直提示有问题.错误是一些什么Strings.xml里面的一些信息 ...

  3. vs开发工具报错:参数错误 异常来自 HRESULT:0x80070057 E_INVALIDARG

    解决方法: 4.0 删除 c:\windows\microsoft.net\framework\v4.0.30319\temporary asp.net files 2..0 删除 c:\window ...

  4. 对 getaddrinfo Android 返回错误 EAI_BADFLAGS

    我们尝试使用 getaddrinfo 对 Android API 14 及以上 (在 c + + 代码使用 NDK r12) 从 IPV4 获得合成的 IPV6 地址 address .这是在 IPV ...

  5. DICOMDIR

    DICOMDIR 是一个可变长度 迷你 database 文件.由 group (0002, xxxx) 和 group (0004, xxxx) 为主题.描述的是一个 4 层的树状结构 (tree ...

  6. Ubuntu 12.04 LTS安装Windows字体

    内容参考自别人的博客:http://www.cnblogs.com/zhj5chengfeng/p/3251009.html 1. 为了方便,先将Windows字体拷贝到~/WinFonts下. 我是 ...

  7. java学习笔记7--抽象类与抽象方法

    接着前面的学习: java学习笔记6--类的继承.Object类 java学习笔记5--类的方法 java学习笔记4--类与对象的基本概念(2) java学习笔记3--类与对象的基本概念(1) jav ...

  8. mysql5.0.x统计每秒增删改查替换数及系统每秒磁盘IO

    转载自:http://blog.chinaunix.net/uid-9370128-id-393082.html 1. mysql 5.0.x 统计每秒增,删,改,查,替换数  mysql 的show ...

  9. .NET破解之爱奇迪(二)

    爱奇迪的其他系统软件我不感兴趣,但这个Database2Sharp看起来好像很有用的. 官网介绍: 一个简单点击几次鼠标就能完成一周代码量的代码生成工具,效率惊人.友好体贴,真正的开发好伴侣,提供了对 ...

  10. 关于UbuntuMate的两个问题点:SSH问题处理与自启动项配置

    一.SSH连接报错问题 ssh到某台机器时候,存在如下报错: /usr/bin/xauth: timeout in locking authority file /home/sam/.Xauthori ...