为什么我会收到这个错误(AttributeError: 'module' object has no attribute 'openssl_md_meth_names')?

4

目前整个论坛似乎只有一个问题与此错误相关。

在通过Python 2.7.11运行E-Pyo中的任何pyo示例时,我会遇到这个错误:

File "C:\Python27\lib\site-packages\pyolib\_core.py", line 22, in <module>
    import random, os, sys, inspect, tempfile
  File "C:\Python27\lib\random.py", line 49, in <module>
    import hashlib as _hashlib
  File "C:\Python27\lib\hashlib.py", line 138, in <module>
    _hashlib.openssl_md_meth_names)
AttributeError: 'module' object has no attribute 'openssl_md_meth_names'

我安装了Python 2.7.11专门为了E-Pyo,之前我已经在使用3.42版本,因此我认为错误可能源于这个问题。

一些搜索引导我检查sys路径与hashlib的关系:

   import sys
   print sys.path
   import _hashlib
   print _hashlib.__file__
   import hashlib
   print hashlib.__file__

输出:

['', 'C:\\Program Files\\Csound6_x64\\bin', 'C:\\Python27', 'C:\\Python27\\pytho
n27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-wi
n', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27\\lib\\site-packages']

C:\Python27\DLLs\_hashlib.pyd
C:\Python27\lib\hashlib.pyc

作为一个新手程序员,我不太确定如何理解这个问题。

那么,问题是,我该如何纠正这个错误?

谢谢!

我的电脑是ACER F550L Intel Core i7-4500U 1.8 GHZ,运行的是Windows操作系统。


我有一个类似的问题,只不过是... AttributeError: module 'arcpy' has no attribute 'BooleanAnd_ia'. @Questionsabound 你解决了吗? - Johnny5ish
1个回答

0

尝试使用:

setup.py install

不要:

python setup.py install

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接