无法在 replit/windows 上安装 Mariadb python 连接器

Cant pip install Mariadb python connector on replit/windows

我一直在尝试 pip install mariadb python connector on replit,但它显示以下错误。同样的事情发生在我的 windows 机器上的私有 ide 上,

Using cached https://package-proxy.replit.com/pypi/packages/d9/70/d5048fa20d2cd986181094cc35ccae284f36e80fe61e2821b79d281b03a2/mariadb-0.9.52.tar.gz (72 kB) ERROR: Command errored out with exit status 1: command: /home/runner/mariadbtech/venv/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-prparsb3/mariadb_2ca8becd72fb47d8909e643e9dfd429b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-prparsb3/mariadb_2ca8becd72fb47d8909e643e9dfd429b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-u63vb67x cwd: /tmp/pip-install-prparsb3/mariadb_2ca8becd72fb47d8909e643e9dfd429b/ Complete output (12 lines): /nix/store/bm7jr70d9ghn5cczb3q0w90apsm05p54-bash-5.1-p8/bin/sh: line 1: mariadb_config: command not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-prparsb3/mariadb_2ca8becd72fb47d8909e643e9dfd429b/setup.py", line 24, in <module> cfg = get_config(options) File "/tmp/pip-install-prparsb3/mariadb_2ca8becd72fb47d8909e643e9dfd429b/mariadb_posix.py", line 49, in get_config cc_version = mariadb_config(config_prg, "cc_version") File "/tmp/pip-install-prparsb3/mariadb_2ca8becd72fb47d8909e643e9dfd429b/mariadb_posix.py", line 26, in mariadb_config raise EnvironmentError( 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. ---------------------------------------- WARNING: Discarding https://package-proxy.replit.com/pypi/packages/d9/70/d5048fa20d2cd986181094cc35ccae284f36e80fe61e2821b79d281b03a2/mariadb-0.9.52.tar.gz#sha256=554e7067ea68430fb7c3b4df1be7c9f2ff3ab7bf806c2d9076f959645e7a96de (from https://package-proxy.replit.com/pypi/simple/mariadb/) (requires-python:>=3.6). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement mariadb (from versions: 0.9.52, 0.9.53, 0.9.54, 0.9.55, 0.9.56, 0.9.57, 0.9.58, 0.9.59, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.0.10, 1.0.11, 1.1.0a1, 1.1.0b1, 1.1.0b2, 1.1.0rc1) ERROR: No matching distribution found for mariadb

我还尝试从网上下载 c 和 python 连接器并手动导入到文件夹中,然后显示错误,无法找到属性连接或属性连接,具体取决于我尝试使用的内容

解决办法在留言里

    Please make sure, that MariaDB Connector/C is installed on your system.
    Either set the environment variable MARIADB_CONFIG or edit the configuration
    file 'site.cfg' and set the 'mariadb_config option, which should point
    to the mariadb_config utility.
    The MariaDB Download website at <https://downloads.mariadb.com/Connectors/c/>
    provides latest stable releease of Connector/C.

来自 , you need to install libmariadb3 and libmariadb-dev. However, I do not think you can use apt-get install on replit environemnt (according to this forum post).

如果您想继续下一步,您将需要一个本地开发环境。