转:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-j8m0mf5q

错误场景

第一次部署服务器时mysqlclient安装失败


思考


初步考虑是pip没有升级,最后发现不是这个原因。


解决办法


来源:https://blog.csdn.net/mr_tia/article/details/79937603


python3 安装mysqlclient报错
执行命令:ln -s /usr/local/mysql/bin/mysql_config /usr/local/bin/mysql_config

pip install mysqlclient

成功