【问题标题】:MariaDB Connector/Python requires MariaDB Connector/C >= 3.2.4, found version 3.1.14MariaDB Connector/Python 需要 MariaDB Connector/C >= 3.2.4,找到版本 3.1.14
【发布时间】:2021-10-24 01:58:09
【问题描述】:

Ubuntu 20.04 需要 3.2.4 版本。否则 pip3 install mariadb 是不可能的:

$ pip3 install mariadb

收集 mariadb 使用缓存的 mariadb-1.1.1.zip (82 kB) 错误:命令出错,退出状态为 2: 命令:/home/ben/miniconda3/bin/python -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xgo4i_hp/mariadb/setup.py'"'"'; 文件='"'"'/tmp/pip-install-xgo4i_hp/mariadb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'" ', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"' "');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip- pip-egg-info-g1jirt2p cwd:/tmp/pip-install-xgo4i_hp/mariadb/ 完整输出(1 行): MariaDB Connector/Python 需要 MariaDB Connector/C >= 3.2.4,找到版本 3.1.14 -------------------------------------- 错误:命令出错,退出状态 2:python setup.py egg_info 检查日志以获取完整的命令输出。

我不知道。 请帮忙。

【问题讨论】:

    标签: python mysql mariadb ubuntu-20.04


    【解决方案1】:

    直接从网页安装最新版本 3.2.4

    https://mariadb.com/downloads/connectors/

    如果你有 mariadb https://mariadb.com/docs/clients/mariadb-connectors/connector-c/install/ 的正确存储库,你也可以 chekc

    【讨论】:

      【解决方案2】:

      我错误地将 MariaDB Connector/Python 1.1 alpha 上传到 pypi.org,但版本控制方案错误,所以一个简单的 pip3 install mariadb 安装了 1.1.0-alpha 而不是最新的稳定版(即 1.0.7)。

      这个问题现在已经修复,只有当你指定 --pre 时才会安装 alpha。

      要测试 alpha,您将需要 Connector/C 2.3.4 - 这是相当新的版本,可能尚未在所有发行版中提供。

      【讨论】:

      • 非常感谢您的修复。它现在可以成功地与 Ubuntu 20.04 一起使用。
      猜你喜欢
      • 2018-04-19
      • 2019-04-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-25
      • 2021-10-09
      • 1970-01-01
      • 2019-12-01
      • 2021-05-26
      相关资源
      最近更新 更多