gpt4 book ai didi

python - 安装 django-toolbelt 的问题

转载 作者:行者123 更新时间:2023-12-04 19:03:21 24 4
gpt4 key购买 nike

我正在尝试安装 django-toolbelt根据 heroku django 安装说明在我的虚拟环境中,但我不断收到以下错误。

这是全新安装的 Ubuntu 14.04 - 所以我不确定是什么问题。我尝试摆弄我的 ubuntu 安装以添加我可能缺少的任何依赖项,但似乎没有任何效果。任何帮助将不胜感激!

(venv)khalid@khalid-laptop:~/Desktop/Projects/heroku-test$ pip install django-toolbelt
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/usr/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/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 "/usr/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/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 "/usr/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/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 "/usr/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/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.
Traceback (most recent call last):
File "/usr/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
File "/usr/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/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 "/home/khalid/Desktop/Projects/heroku-test/venv/bin/pip", line 9, in <module>
load_entry_point('pip==1.1', 'console_scripts', 'pip')()
File "/home/khalid/Desktop/Projects/heroku-test/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/khalid/Desktop/Projects/heroku-test/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 2279, in load_entry_point
return ep.load()
File "/home/khalid/Desktop/Projects/heroku-test/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 1989, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/home/khalid/Desktop/Projects/heroku-test/venv/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/__init__.py", line 10, in <module>
from pip.backwardcompat import walk_packages, console_to_str
File "/home/khalid/Desktop/Projects/heroku-test/venv/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/backwardcompat.py", line 18, in <module>
import md5 as md5_module
File "/usr/lib/python2.7/md5.py", line 10, in <module>
from hashlib import md5
ImportError: cannot import name md5

最佳答案

在敲了几下头之后,我最终删除了我的virtualenv。文件夹,重新安装 python-virtualenv并使用 --no-site-packages 创建一个新的标志,我能够安装django-toolbelt成功地。

关于python - 安装 django-toolbelt 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24844121/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com