用python,这环境问题真是够让人头痛的,在django用mysql数据库,pip安装mysqlclient时,出现以下报错:
Command ‘lsb_release -a’ returned non-zero exit status 1

解决办法:

看看/usr/lib/python3/dist-packages里有没有lsb_release.py
copy到你的python3(我的版本3.7,你看自己的是哪个版本):
$ sudo cp /usr/lib/python3/dist-packages/lsb_release.py /usr/local/lib/python3.7/

PS: pip安装mysqlclient方法:

https://pypi.org/project/mysqlclient/

文章来源于互联网,如有雷同请联系站长删除:pip install 报错Command ‘lsb_release -a’ returned non-zero exit status 1

发表评论