<i id='SztD5'><tr id='SztD5'><dt id='SztD5'><q id='SztD5'><span id='SztD5'><b id='SztD5'><form id='SztD5'><ins id='SztD5'></ins><ul id='SztD5'></ul><sub id='SztD5'></sub></form><legend id='SztD5'></legend><bdo id='SztD5'><pre id='SztD5'><center id='SztD5'></center></pre></bdo></b><th id='SztD5'></th></span></q></dt></tr></i><div id='SztD5'><tfoot id='SztD5'></tfoot><dl id='SztD5'><fieldset id='SztD5'></fieldset></dl></div>

<small id='SztD5'></small><noframes id='SztD5'>

      <bdo id='SztD5'></bdo><ul id='SztD5'></ul>

  • <legend id='SztD5'><style id='SztD5'><dir id='SztD5'><q id='SztD5'></q></dir></style></legend>
    1. <tfoot id='SztD5'></tfoot>

      1. Python MariaDB pip 安装失败,缺少 mariadb_config

        时间:2023-07-06

        1. <legend id='L9mkA'><style id='L9mkA'><dir id='L9mkA'><q id='L9mkA'></q></dir></style></legend>
            <tbody id='L9mkA'></tbody>

          <small id='L9mkA'></small><noframes id='L9mkA'>

              <bdo id='L9mkA'></bdo><ul id='L9mkA'></ul>

                  <i id='L9mkA'><tr id='L9mkA'><dt id='L9mkA'><q id='L9mkA'><span id='L9mkA'><b id='L9mkA'><form id='L9mkA'><ins id='L9mkA'></ins><ul id='L9mkA'></ul><sub id='L9mkA'></sub></form><legend id='L9mkA'></legend><bdo id='L9mkA'><pre id='L9mkA'><center id='L9mkA'></center></pre></bdo></b><th id='L9mkA'></th></span></q></dt></tr></i><div id='L9mkA'><tfoot id='L9mkA'></tfoot><dl id='L9mkA'><fieldset id='L9mkA'></fieldset></dl></div>
                • <tfoot id='L9mkA'></tfoot>
                  本文介绍了Python MariaDB pip 安装失败,缺少 mariadb_config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 Linux Ubuntu 18.04 和 python 3.我正在尝试在 maria-db 和我的 python 脚本之间建立连接.因此我必须安装mariadb包.
                  我已经安装了:

                  I am using Linux Ubuntu 18.04 and python 3. I am trying to build a connection between a maria-db and my python scripts. Therefore I have to install the mariadb package.
                  I have already installed:

                  sudo apt install mariadb-server
                  

                  但是当我尝试时:

                  pip install mariadb
                  

                  我收到以下错误:

                  Collecting mariadb
                    Using cached mariadb-1.0.0.tar.gz (78 kB)
                  
                      ERROR: Command errored out with exit status 1:
                       command: /home/niklas/Desktop/Stuff/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pycharm-packaging/mariadb/setup.py'"'"'; __file__='"'"'/tmp/pycharm-packaging/mariadb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
                  '"'"', '"'"'
                  '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-wfnscxnz
                           cwd: /tmp/pycharm-packaging/mariadb/
                      Complete output (12 lines):
                      /bin/sh: 1: mariadb_config: not found
                      Traceback (most recent call last):
                        File "<string>", line 1, in <module>
                        File "/tmp/pycharm-packaging/mariadb/setup.py", line 26, in <module>
                          cfg = get_config(options)
                        File "/tmp/pycharm-packaging/mariadb/mariadb_posix.py", line 49, in get_config
                          cc_version = mariadb_config(config_prg, "cc_version")
                        File "/tmp/pycharm-packaging/mariadb/mariadb_posix.py", line 27, in mariadb_config
                          "mariadb_config not found.
                  Please make sure, that MariaDB Connector/C is installed on your system, edit the configuration file 'site.cfg' and set the 'mariadb_config'
                  option, which should point to the mariadb_config utility.")
                      OSError: mariadb_config not found.
                      Please make sure, that MariaDB Connector/C is installed on your system, edit the configuration file 'site.cfg' and set the 'mariadb_config'
                      option, which should point to the mariadb_config utility.
                      ----------------------------------------
                  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
                  

                  谁能帮帮我?

                  我现在已经能够连接到服务器,但不能使用 mariadb 包.(https://linuxhint.com/connect_mariadb_pymysql/)

                  I have now been able to connect to the server but not with te mariadb package. (https://linuxhint.com/connect_mariadb_pymysql/)

                  推荐答案

                  要安装mariadb python 模块,您必须安装最新版本的MariaDB Connector/C,最低要求版本为3.1.5,afaik Ubuntu 18.04 有3.0.3.

                  To install mariadb python module, you have to install a recent version of MariaDB Connector/C, minimum required version is 3.1.5, afaik Ubuntu 18.04 has 3.0.3.

                  上提供了用于仿生的 Connector/C 的实际版本MariaDB 连接器/C 下载页面.

                  如果要将其安装在特殊目录中,请确保 PATH 和 LD_LIBRARY_PATH 指向 bin 和 lib 目录.

                  If you want to install it in a special directory, make sure that the PATH and LD_LIBRARY_PATH point to bin and lib directories.

                  我还建议使用最新版本的 MariaDB Server,尤其是非常快的 executemany() 方法在 MariaDB Server 上会慢得多

                  10.2.

                  I also recommend to use a recent version of MariaDB Server, especially the very fast executemany() method will be much slower on MariaDB Server < 10.2.

                  这篇关于Python MariaDB pip 安装失败,缺少 mariadb_config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:django.db.utils.OperationalError: (1071, '指定的密钥太长;最大密钥长度 下一篇:django.db.utils.OperationalError: (2002, "Can't con

                  相关文章

                  1. <tfoot id='i4Z9c'></tfoot>

                  2. <legend id='i4Z9c'><style id='i4Z9c'><dir id='i4Z9c'><q id='i4Z9c'></q></dir></style></legend>

                    <i id='i4Z9c'><tr id='i4Z9c'><dt id='i4Z9c'><q id='i4Z9c'><span id='i4Z9c'><b id='i4Z9c'><form id='i4Z9c'><ins id='i4Z9c'></ins><ul id='i4Z9c'></ul><sub id='i4Z9c'></sub></form><legend id='i4Z9c'></legend><bdo id='i4Z9c'><pre id='i4Z9c'><center id='i4Z9c'></center></pre></bdo></b><th id='i4Z9c'></th></span></q></dt></tr></i><div id='i4Z9c'><tfoot id='i4Z9c'></tfoot><dl id='i4Z9c'><fieldset id='i4Z9c'></fieldset></dl></div>

                      • <bdo id='i4Z9c'></bdo><ul id='i4Z9c'></ul>

                      <small id='i4Z9c'></small><noframes id='i4Z9c'>