【发布时间】:2010-08-04 14:45:09
【问题描述】:
由于某种原因,每次我尝试使用 easy_install 安装新模块时,都会收到错误消息:
AttributeError: 'module' object has no attribute '__getstate__'
我正在使用 setuptools-0.6c11-py2.6
【问题讨论】:
标签: python django easy-install
由于某种原因,每次我尝试使用 easy_install 安装新模块时,都会收到错误消息:
AttributeError: 'module' object has no attribute '__getstate__'
我正在使用 setuptools-0.6c11-py2.6
【问题讨论】:
标签: python django easy-install
试试http://code.activestate.com/lists/python-distutils-sig/13989/:要点是“重新安装setuptools”。
【讨论】:
我有同样的问题,但解决方案是我有两个版本的 setuptools:一个在 /usr/local/lib/python2.6/dist-packages/distribute-0.6.8-py2.6.egg / 一个在 /usr/lib/python2.6/dist-packages/ 中。前者是一个过时的版本,但 /usr/local/lib/python2.6/dist-packages 在我的路径上更早。我删除了旧的,很高兴去。
【讨论】:
setuptools 相关的文件(包括名称中包含easy_install 的文件)。我删除了所有我发现并重新安装setuptools 的工作。谢谢
对我来说,问题与 jessykate 提到的相同,但恰恰相反。
我必须删除安装到 /usr/local/lib/python2.6/dist-packages/ 的版本并保留位于 /usr/lib/python2.6/dist-packages/ 的版本这是在 Ubuntu 10.04 LTS。希望对您有所帮助。
【讨论】:
尝试yum reinstall python-setuptools 并再次运行easy_install 命令。
【讨论】: