Python 2.7.5,导入随机在AIX platfrom上引发错误 [英] Python 2.7.5, import random is throwing error on AIX platfrom

查看:118
本文介绍了Python 2.7.5,导入随机在AIX platfrom上引发错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在AIX操作系统上的python 2.7.5中执行随机导入。它将引发以下异常。

I am not able to do "import random" in python 2.7.5 on AIX operating system. It throws the following exceptions.

Python 2.7.5 (default, Aug  2 2013, 23:28:11) [C] on aix6
Type "help", "copyright", "credits" or "license" for more information.
>>> import random
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/opt/freeware/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/freeware/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/opt/freeware/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/freeware/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/opt/freeware/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/freeware/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/opt/freeware/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/freeware/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.

我搜索了错误消息,它说缺少libssl,谁能告诉我如何在AIX上安装libssl。

I searched for the error it says libssl is missing can anyone tell me how to install libssl on AIX.

推荐答案

您可以从IBM此处下载openssl->

You can download openssl from IBM here ->

< a href = https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?source=aixbp&S_PKG=openssl rel = nofollow noreferrer> https://www14.software .ibm.com / webapp / iwm / web / reg / download.do?source = aixbp& S_PKG = openssl

并按如下所示安装

mkdir openssl.0.9.8.1103 && cd openssl.0.9.8.1103 && uncompress -c < ../openssl.0.9.8.1103.tar.Z |tar -xvf - && installp -acXYgd . openssl

这篇关于Python 2.7.5,导入随机在AIX platfrom上引发错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆