首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >有没有可能重新部署pythonbrew

有没有可能重新部署pythonbrew
EN

Stack Overflow用户
提问于 2012-07-16 21:53:10
回答 1查看 417关注 0票数 1

我正在尝试创建一个debian包,其中包含使用pythonbrew自定义构建的python。

编译和debian构建是成功的。问题是,当我在其他机器上安装这个包时,一些模块无法工作。例如,hashlib甚至os.getcwd()都无法正常工作。而在构建机器上,一切都能正常工作。

有可能重新安装python吗?可能的问题是什么?

代码语言:javascript
复制
>>> from hashlib import md5
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name md5

我在/opt/sw-python/extra/pythonbrew目录中构建它,并且在安装时将pythonbrew放在相同的/opt/sw-python/extra/pythonbrew目录中。

目标计算机:

代码语言:javascript
复制
Linux german-pc 3.0.0-12-generic ... x86_64 x86_64 x86_64 GNU/Linux

构建计算机:

代码语言:javascript
复制
Linux ds5vs5 2.6.32-5-amd64 ... 2012 x86_64 GNU/Linux
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-07-17 11:23:09

最后,我在另一台debian机器上安装了我的Debian包,类似于build机器。它成功了!

我不知道到底是什么导致了这个问题,但我猜这是内核或编译器的不同。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11505814

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档