python 环境依赖问题集锦

mysqlclient 安装失败

问题:

Running setup.py bdist_wheel for mysqlclient: finished with status 'error'

解决方案:

LDFLAGS=-L/usr/local/opt/openssl/lib pip install mysqlclient

python2.7 Mysql-Python 安装失败

问题:

#include "my_config.h" ^~~~~~~~~~~~~ 1 error generated. error: command 'cc' failed with exit status 1

解决方案:

下载Mysql-python包手动安装
下载地址:[https://pypi.org/project/MySQL-python/#files](https://pypi.org/project/MySQL-python/#files)
调整 MySQL-python-1.2.5/site.cfg 文件中 mysql_config = /usr/local/mysql/bin/mysql_config (此处修改为本机中mysql_config path)
进入MySQL-python-1.2.5目录,执行以下命令:
$ python setup.py build $ sudo python setup.py install

持续更新中~~~

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容