使用easy_install ImportError的python:没有名为_md5的模块
作者:互联网
我进行了很多搜索,但未找到针对此问题的任何答案=(
我将CentOS 5作为服务器,遵循以下方法:
http://wiki.osqa.net/display/docs/RHEL%2C+CentOS+5+Installation+Guide#RHEL%2CCentOS5InstallationGuide-Python
我能够安装与yum版本分开的python 2.6.但是当我运行./easy_install ElementTree时,出现了这个奇怪的错误:
Traceback (most recent call last):
File "./easy_install", line 9, in <module>
load_entry_point('distribute==0.6.14', 'console_scripts', 'easy_install')()
File "/opt/ActivePython-2.6/lib/python2.6/site-packages/pkg_resources.py", line 305, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/opt/ActivePython-2.6/lib/python2.6/site-packages/pkg_resources.py", line 2244, in load_entry_point
return ep.load()
File "/opt/ActivePython-2.6/lib/python2.6/site-packages/pkg_resources.py", line 1954, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 24, in <module>
from setuptools.package_index import PackageIndex
File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools/package_index.py", line 2, in <module>
import sys, os.path, re, urlparse, urllib2, shutil, random, socket, cStringIO
File "/opt/ActivePython-2.6/lib/python2.6/urllib2.py", line 93, in <module>
import hashlib
File "/opt/ActivePython-2.6/lib/python2.6/hashlib.py", line 136, in <module>
md5 = __get_builtin_constructor('md5')
File "/opt/ActivePython-2.6/lib/python2.6/hashlib.py", line 63, in __get_builtin_constructor
import _md5
ImportError: No module named _md5
我不了解python,也不知道如何解决此问题,我正在尝试安装OSQA,以便为另一个国家/地区运行phpBB支持论坛.
感谢您的任何帮助,最好的问候.
解决方法:
我猜以前在CentOS上有过类似的问题,就是新Python的ld路径未设置,并且找不到其可加载模块文件夹.
该博客文章的第3个代码块显示了为opt Python(尽管它是2.7)设置ld路径:http://toey.tc20.net/2010/08/04/install-python-2-7-gevent-on-centos-5-x86_64/
我认为安装程序会在安装步骤中完成此操作,但是上面的博客文章可能会有所帮助.
标签:easy-install,python 来源: https://codeday.me/bug/20191010/1884690.html