3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ModuleNotFoundError: No module named 'Crypto'

Posted at

お急ぎの方

下記実行で解決します。

pip uninstall Crypto
pip uninstall pycrypto
pip install pycryptodome

概要

テキストの暗号化を調べながら実装しているときに、これらのエラーに出くわしました。

  • ModuleNotFoundError: No module named 'Crypto'
  • AttributeError: module 'time' has no attribute 'clock'

それぞれ、python3.8以降では対応するモジュールが非推奨になっていることが原因で発生したエラーでした。また、time.clock()はすでに死んだ使い方らしいので、

  • time.perf_counter()
  • time.process_time()

これらを使わないといけないらしいです。

(参考)

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?