Pythonのcryptographyモジュールのインストールエラー

MX Linux(DebianLinux)で

$ pip3 install cryptography

を実行したらエラーになった。

    build/temp.linux-x86_64-3.7/_openssl.c:575:10: fatal error: openssl/opensslv.h: そのようなファイルやディレクトリはありません
     #include <openssl/opensslv.h>
              ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.
$ sudo apt install libssl-dev

を実行してからインストールしたら成功した。