gpt4 book ai didi

python - 生产中的 django 和 mysql 设置

转载 作者:行者123 更新时间:2023-11-29 06:07:40 24 4
gpt4 key购买 nike

我正在尝试在我的生产服务器(Ubuntu 12.04)上设置 mysql。我按照这个教程http://www.saltycrane.com/blog/2008/07/how-set-django-mysql-ubuntu-hardy/然后我运行 python manage.pysyncdb 它显示此错误 https://gist.github.com/2777611

我也检查了这个Getting "Error loading MySQLdb module: No module named MySQLdb" - have tried previously posted solutions然后我尝试运行 pip install MySQL-python 但没有用,这显示了此错误 https://gist.github.com/2777629

谁能告诉我问题所在吗?

谢谢!

最佳答案

您可以安装 Ubuntu 存储库中包含的 python MySQL 库:

sudo apt-get install python-mysqldb

(在这种情况下,您不需要执行 pip install MySQL-python)


或者您可以安装 MySQL 开发库,然后尝试 pip install MySQL-python 技术:

sudo apt-get install libmysqlclient-dev

关于python - 生产中的 django 和 mysql 设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10727429/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com