python MySQLdb ImportError: cannot import name conversions 解决办法
2013-09-01 18:08
1116 查看
这被这个问题蛋疼许久,网上也找不到这方面的帖子,最后在 google 论坛看到了
https://groups.google.com/forum/#!topic/django-users/RkQXi8pcz6M
在天朝估计很多人打不开这个网址,下面说下解决办法!
>>> from MySQLdb.converters import conversions
The error you are seeing suggests that this is not the case.
The fact that you report your MySQLdb install as 'rev 635' suggests
that you're using a development version of MySQLdb. Either MySQLdb has
introduced a backwards incompatibility, or your build is incomplete or
contains errors.
To confirm this, I would suggest using a production version of MySQLdb
- recent production releases are known to work.
If it turns out that there has been a backwards incompatible
regression in MySQLdb, we will need to address that when a formal
release that contains that change is made.
就是安装了开发版的 MySQLdb 导致的,确实如此,我之前胡乱下的一个版本
看到此贴后,立即去官网下了最新正式版:
http://sourceforge.net/projects/mysql-python/?source=dlp
版再次安装,问题得以解决!
tar -xzf MySQL-python-1.2.4b4.tar.gz
cd MySQL-python-1.2.4b4
python setup.py build
python setup.py install
https://groups.google.com/forum/#!topic/django-users/RkQXi8pcz6M
在天朝估计很多人打不开这个网址,下面说下解决办法!
>>> from MySQLdb.converters import conversions
The error you are seeing suggests that this is not the case.
The fact that you report your MySQLdb install as 'rev 635' suggests
that you're using a development version of MySQLdb. Either MySQLdb has
introduced a backwards incompatibility, or your build is incomplete or
contains errors.
To confirm this, I would suggest using a production version of MySQLdb
- recent production releases are known to work.
If it turns out that there has been a backwards incompatible
regression in MySQLdb, we will need to address that when a formal
release that contains that change is made.
就是安装了开发版的 MySQLdb 导致的,确实如此,我之前胡乱下的一个版本
看到此贴后,立即去官网下了最新正式版:
http://sourceforge.net/projects/mysql-python/?source=dlp
版再次安装,问题得以解决!
tar -xzf MySQL-python-1.2.4b4.tar.gz
cd MySQL-python-1.2.4b4
python setup.py build
python setup.py install
相关文章推荐
- 【Scrapy】Scrapy在Python3下报错:“cannot import name '_win32stdio'”解决办法
- python导入词云包失败:ImportError:cannot import name ‘WordCloud’的解决办法
- 安装comtypes 0.6.2时ImportError: cannot import name DistutilsOptionError 解决办法
- 解决bs4在Python 3.6下出现“ImportError: cannot import name 'HTMLParseError'”错误
- 网络爬虫在Python 3.5下出现“ cannot import name 'HTMLParseError'”错误解决办法
- Python2下ImportError: cannot import name 'urlopen'问题解决
- 解决bs4在Python 3.5下出现“ImportError: cannot import name 'HTMLParseError'”错误
- python scrapy cannot import name xmlrpc_client的解决方案,解决办法
- ImportError: cannot import name 'ctc_ops'解决办法
- python之import异常-ImportError: cannot import name xxx
- python django ImportError: cannot import name 'parse_http_list'
- 【已解决】Python运行Queue报错ImportError: cannot import name 'Empty'
- 解决 ImportError: cannot import name pywrap_tensorflow
- 解决ImportError: cannot import name HTTPSHandler
- 使用sklearn时cannot import name MLPClassifier的解决办法
- carbon报错 Python Error - ImportError: cannot import name daemonize
- Python ImportError: cannot import name *
- Python ImportError: cannot import name NUMPY_MKL
- ImportError: cannot import name ABCMeta 问题解决
- python中调用 imread 报错: ImportError: cannot import name imread