在Python中加载SSL库

时间:2014-08-26 10:56:51

标签: python django ssl

我想导入OpenSSL库以便在Python中使用EVP_MD对象。因此我使用了sslsnoop。但是,当我尝试在python代码中导入库时发生错误。

from sslsnoop import ctypes_openssl

这是错误:

django.core.exceptions.ImproperlyConfigured: Requested setting HAYSTACK_ID_FIELD, but
settings are not configured. You must either define the environment variable
DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

我该怎么办?

感谢您的支持。

1 个答案:

答案 0 :(得分:0)