推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
lxy
V2EX  ›  Python

mysql-connector-python 安装失败,何解?

  •  
  •   lxy · Jan 15, 2016 · 7908 views
    This topic created in 3772 days ago, the information mentioned may be changed or developed.
    系统 CentOS 6 ,原本已有 Python 2.7 ,后来装了 Python 3.5 , pip 安装 mysql-connector-python 的时候报错说找不到合适的版本,我以为是 py3.5 较新,于是删除了 py3.5 ,装 py3.4.3 ,问题依旧。

    ```bash
    > pip3 install mysql-connector-python
    Collecting mysql-connector-python
    Could not find a version that satisfies the requirement mysql-connector-python (from version: )
    No matching distribution found for mysql-connector-python
    ```
    而且到 MySQL 官网也找不到 CentOS 的安装包( https://dev.mysql.com/downloads/connector/python/)。难道要我换系统吗?

    PS. Project 已写好,不打算更换其它 MySQL 库。
    6 replies    2016-01-17 01:07:29 +08:00
    imkh
        1
    imkh  
       Jan 15, 2016
    lxy
        2
    lxy  
    OP
       Jan 15, 2016
    @imkh No package mysql-connector-python available
    我之前也试过了
    imkh
        3
    imkh  
       Jan 15, 2016   ❤️ 1
    @lxy 加个 epel 源就有了
    lxy
        4
    lxy  
    OP
       Jan 15, 2016
    @imkh 终于安装上了,但是只有 py2.7 能用,可能会是什么原因?
    SYB
        5
    SYB  
       Jan 15, 2016
    python3 和 mysql-connector-python 不太兼容。可以用 mysqlclient 。
    staticor
        6
    staticor  
       Jan 17, 2016
    考虑使用 virtualenv 或 pyenv 来管理多种不同 python 版本
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1269 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 17:31 · PVG 01:31 · LAX 10:31 · JFK 13:31
    ♥ Do have faith in what you're doing.