<p>如果您要使用的库对于您的解释器版本不可用,那么您就无法使用该库而不自行移植或等待其他人为您进行移植。这可能不是你想要的。在</p>
<p>这意味着<code>Dtls</code>库只适用于Python2.7和<a href="https://pypi.org/project/Dtls/" rel="nofollow noreferrer">website</a>上提到的OpenSSL库的1.0.0或更高版本,尽管它已经在几个平台(包括您的平台)上测试过:</p>
<blockquote>
<p>At the time of initial release, PyDTLS 0.1.0 has been tested on Ubuntu 12.04.1 LTS 32-bit and 64-bit, as well as Microsoft Windows 7 32-bit and 64-bit, using CPython 2.7.3. Patches with additional platform ports are welcome.</p>
<p>As of release 1.2.0, PyDTLS is tested on Ubuntu 16.04 LTS as well as Microsoft Windows 10, using CPython 2.7.13.</p>
</blockquote>
<p>如果必须使用Python3.x,您可以使用其他库,例如标准<code>ssl</code>库,或者也可以使用<a href="https://pyopenssl.org/en/stable/introduction.html" rel="nofollow noreferrer">pyOpenSSL</a>库:</p>
<blockquote>
<p>pyOpenSSL remains the only alternative for full-featured TLS code across all noteworthy Python versions from 2.7 through 3.5 and PyPy.</p>
</blockquote>
<p><code>Dtls</code>是一个简化实现的库,但您不依赖它。
作为补充说明:对于pyOpenSSL,您还可以通过阅读<a href="https://stackoverflow.com/questions/23583508/how-to-get-current-cipher-in-pyopenssl-for-dtls">this post</a>了解如何实现它。在</p>