简体   繁体   English

pipenv:已安装软件包但未找到模块

[英]pipenv: package installed but module not found

I recently installed pipenv.我最近安装了 pipenv。 I need to use the module named Crypto under python 3.6.我需要在python 3.6下使用名为Crypto的模块。 I currently run 3.8 so I decided to use pipenv !我目前运行 3.8 所以我决定使用 pipenv !

pipenv install Crypto

Adding Crypto to Pipfile's [packages]…
✔ Installation Succeeded 
Pipfile.lock (da1a8d) out of date, updating to (ca72e7)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✔ Success! 
Updated Pipfile.lock (da1a8d)!
Installing dependencies from Pipfile.lock (da1a8d)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 9/9 —

Then I did : pipenv shell and ./skeleton.py init然后我做了: pipenv shell./skeleton.py init

I got the message :我收到消息:

Traceback (most recent call last):
  File "./skeleton.py", line 5, in <module>
    from toolbox import *
  File "/home/alex/Documents/4TC-CSC/csc/td2-code/toolbox.py", line 11, in <module>
    from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'

I don't understand what is wrong... Any help would be appreciated :)我不明白出了什么问题......任何帮助将不胜感激:)

Literally, from the first page of the docs :从字面上看,从文档的第一页:

pip install pycryptodome pip 安装 pycryptodome

Notice it is not注意不是

pip install crypto pip 安装加密

which is a totally different package.这是一个完全不同的包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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