我正在尝试在具有特定 python 版本的 linux 机器上运行 python 脚本,但遇到了一些麻烦。每次我尝试在 linux 机器上运行脚本时,我都会在下面粘贴回溯。该盒子有一个 Isilon 存储系统安装在存储脚本的位置。当我尝试在 Isilon 的头节点上运行脚本时,它运行良好。我无法弄清楚这两个系统之间会有什么不同,因为我在两个地方都使用了相同版本的 python。更令人困惑的是,一些 linux 机器可以很好地运行脚本。所有的 linux 机器似乎都具有相同的版本,我从同一个磁盘同时安装了所有软件。任何反馈将不胜感激。如有必要,我很乐意提供更多解释,我相信这很令人困惑。
我用“PATH”替换了脚本的完整路径。
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
File "PATH/libexec/python/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "PATH/libexec/python/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
File "diskLoader/DiskLoaderMonitoring.py", line 12, in <module>
from WasabiClient import WasabiClient
File "PATH/lib/WasabiClient.py", line 13, in <module>
from ServiceClient import ServiceClient
File "PATH/lib/ServiceClient.py", line 6, in <module>
import requests
File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/__init__.py", line 58, in <module>
from . import utils
File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/utils.py", line 23, in <module>
from .compat import parse_http_list as _parse_list_header
File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/compat.py", line 7, in <module>
from .packages import charade as chardet
File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/packages/__init__.py", line 3, in <module>
from . import urllib3
File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/packages/urllib3/__init__.py", line 16, in <module>
from .connectionpool import (
File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/packages/urllib3/connectionpool.py", line 60, in <module>
from .response import HTTPResponse
File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/packages/urllib3/response.py", line 14, in <module>
from .util import is_fp_closed
File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/packages/urllib3/util.py", line 11, in <module>
from hashlib import md5, sha1
ImportError: cannot import name md5