我在AWS上创建了一个EC2实例,并使用PuTTY连接到它.
我无法安装的MySQL蟒使用python PIP命令如下:
PIP安装MySQL-蟒(通过根特权)
以下是错误的控制台输出
Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-JGbAEI/MySQL-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-build-JGbAEI/MySQL-python/setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-build-JGbAEI/MySQL-python/setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error …Run Code Online (Sandbox Code Playgroud) 我正在尝试在运行 Amazon Linux 2023 AMI 的 Amazon EC2 实例上安装 mysqlclient Python 包。
\n当我运行时pip install mysqlclient,我收到以下错误消息:
Collecting mysqlclient==2.1.0\n Downloading mysqlclient-2.1.0.tar.gz (87 kB)\n \xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81 87.6/87.6 kB 17.2 MB/s eta 0:00:00\n Preparing metadata (setup.py) ... error\n error: subprocess-exited-with-error\n\n \xc3\x97 python setup.py egg_info did not run successfully.\n \xe2\x94\x82 exit code: 1\n \xe2\x95\xb0\xe2\x94\x80> [16 lines of output]\n /bin/sh: line 1: mysql_config: command not found\n /bin/sh: line 1: mariadb_config: command not found\n /bin/sh: line 1: mysql_config: command not found\n Traceback (most recent …Run Code Online (Sandbox Code Playgroud)