简体   繁体   中英

Is Dtls available in python3, and how to install it?

From the description of Dtls library , it seems it's not available in python3. And when I want to install with pip install Dtls there's always an

Command "python setup.py egg_info" failed with error code 1 in C:\\Users\\sun\\AppData\\Local\\Temp\\pip-build-c_46y9mt\\Dtls\\

Solution here doesn't help. I am using Python 3.6 on Win7. Do I have another option for DTLS?

python3-dtls是dtls包的python3版本。

If the library you want to use is not available for the version of your interpreter, then you simply cannot use that library without porting it yourself or waiting for others doing that for you. This is probably not what you want.

This means that Dtls library works only for Python2.7 and version 1.0.0 or higher of the OpenSSL library as mentioned on the website , although it's tested on several plattforms (including yours):

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.

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.

You can use other libraries if you have to use Python3.x, eg standard ssl library or maybe also pyOpenSSL library:

pyOpenSSL remains the only alternative for full-featured TLS code across all noteworthy Python versions from 2.7 through 3.5 and PyPy.

Dtls is a library which simplifies implementation but you are not dependent on it. Just as a side note: For pyOpenSSL you can also get an idea how to implement it by reading this post .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM