加载MySQLdb模块时出错:libmysqlclient.so.20:无法打开共享对象文件:没有这样的文件或目录 [英] Error loading MySQLdb module: libmysqlclient.so.20: cannot open shared object file: No such file or directory

查看:4566
本文介绍了加载MySQLdb模块时出错:libmysqlclient.so.20:无法打开共享对象文件:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行的django项目,由于某些原因,我不得不删除当前的mysql版本,并在我的机器上安装不同的MySQL版本。



但现在,当我尝试运行此程序时,会收到如下错误:

  raise ImproperlyConfigured(Error loading MySQLdb module:%s%e)
django.core.exceptions.ImproperlyConfigured:加载MySQLdb模块时出错:libmysqlclient.so.20:无法打开共享对象文件:没有这样的文件或目录


解决方案

重新安装c共享库:

  pip卸载mysql-python 
pip安装mysql-python
/ pre>

I had a running django project and for some reasons I had to remove the current mysql version and install a different MySQL version in my machine.

But now when I am trying to run this program am getting an error as follows:

raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient.so.20: cannot open shared object file: No such file or directory

解决方案

reinstall the c shared library:

pip uninstall mysql-python
pip install mysql-python

这篇关于加载MySQLdb模块时出错:libmysqlclient.so.20:无法打开共享对象文件:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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