在 Windows 中的 VS Code 上 pip install mariadb 出错

问题描述 投票:0回答:1

我必须使用Python连接mariadb数据库,因为我试图在vs code上安装mariadb,我收到以下错误:

Collecting mariadb
  Using cached mariadb-1.1.10.tar.gz (84 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 3
  ╰─> [1 lines of output]
      Could not find InstallationDir of MariaDB Connector/C. Please make sure MariaDB Connector/C is installed or specify the InstallationDir of MariaDB Connector/C by setting the environment variable MARIADB_CC_INSTALL_DIR.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 3
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

我已经安装了Windows(64位86x)版本的mariadb C-连接器:3.3.11-GA

python pip mariadb
1个回答
0
投票

将 MARIADB_CC_INSTALL_DIR 环境变量设置为 MariaDB Connector/C 的 InstallationDir。

© www.soinside.com 2019 - 2024. All rights reserved.