Django MySQLdb版本不符合_mysql版本的Ubuntu [英] Django MySQLdb version doesn't match _mysql version Ubuntu

查看:266
本文介绍了Django MySQLdb版本不符合_mysql版本的Ubuntu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从存储库部署一个django站点。我几乎在那里,然后改变了一些东西(我不知道什么!!),并回到了一个方块。

I'm trying to get a django site deployed from a repository. I was almost there, and then changed something (I'm not sure what!!) and was back to square one.

现在我试图运行./ manage.py syncdb并得到以下错误:

Now I'm trying to run ./manage.py syncdb and get the following error:


django.core.exceptions.ImproperlyConfigured:加载MySQLdb模块时出错:这是MySQLdb版本( 1,2,3,'final',0),但_mysql是版本(1,2,2,'final',0)

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: this is MySQLdb version (1, 2, 3, 'final', 0), but _mysql is version (1, 2, 2, 'final', 0)

我已经搜索了几个小时的论坛,没有一个解决方案提供了帮助。我尝试卸载并重新安装MySQL-python并进行升级。我尝试从python命令行解释器导入时遇到相同的错误。

I've searched forums for hours and none of the solutions presented helped. I tried uninstalling and re-installing MySQL-python and upgrading it. I get the same error when trying to import it from the python command line interpreter.

有没有人有任何建议?

推荐答案

对于那些出现这个问题的人:

For those who come upon this question:

事实证明,ubuntu _mysql版本与我的VENV。卸载和重新安装在我的venv做了伎俩。

It turns out that ubuntu _mysql version was different from the one in my venv. Uninstalling that and re-installing in my venv did the trick.

这篇关于Django MySQLdb版本不符合_mysql版本的Ubuntu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆