通过以上步骤,你应该能够解决mysqlclient OSError: mysql_config not found的问题。如果问题依旧存在,请检查每一步是否正确执行,并确保没有遗漏任何必要的步骤。
这将使用pip来安装mysqlclient库。 完成以上步骤后,你应该能够成功地安装mysqlclient库,而不再遇到OSError: mysql_config not found错误。 总结 在使用Python开发过程中,安装mysqlclient库时遇到OSError: mysql_config not found错误是比较常见的问题。解决该问题的步骤包括确保已安装MySQL数据库、安装必要的依赖库、设置...
py egg_info: /bin/sh: mysql_config: command not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-ctrzre4u/mysqlclient/setup.py", line 17, in <module> metadata, options = get_config() File "/tmp/pip-build-ctrzre4u/mysql...
raiseEnvironmentError("%s not found"% (mysql_config.path,)) OSError: mysql_config not found 发现原来是用 apt 安装的 mysql 的 mysql_config 文件缺失了, 需要安装 libmysqld-dev 和 libmysqlclient-dev 两个包。 如果安装时少了 libmysqld-dev 就会报这个错, n__=1.3.12 -I/usr/include/mysql -I/...
如果一切顺利,mysqlclient将成功安装到你的虚拟环境中。 总结 通过按照上述步骤,你可以成功解决"linux使用pip安装mysqlclient报错mysql_config not found"的问题。请确保按照顺序执行每个步骤,并注意安装依赖包和创建虚拟环境的步骤。 希望本文对你有所帮助,祝你在开发过程中顺利安装和使用mysqlclient!
OSError: mysql_config not found 先安装brew(如果没有) /bin/zsh -c "$(curl -fsSLhttps://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" 安装mysql-connector-c brew install mysql-connector-c 添加到PATH 根据提示,添加到你的PATH
/bin/sh: 1: mysql_config: not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-0k211e13/mysqlclient/setup.py", line 16, in <module> metadata, options = get_config()
没安装mysql-server和mysql-client 你安装的mysqlclient 是 mysql数据库的python sdk, 你安装他的前提是你的电脑要安装了mysql 的服务器和客户端(至少要安装客户端) 参考地址 https://www.cnblogs.com/kuangkuangduangduang/p/10250747.html 如果不符合你当前的系统 也可以找当前系统下的安装方法, 说白了 就是如...
OSError: mysql_config not found 解决办法: 安装mysql-connector-c: brew install mysql-connector-c 如果电脑没有安装brew,按照以下方式安装brew,再安装mysql-connector-c: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ...
/bin/sh: 1: mysql_config: not found /bin/sh: 1: mariadb_config: not found /bin/sh: 1: mysql_config: not found Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> ...