@stasbombit

Python не видит библиотеку Crypto?

В коде подключается библиотека from Crypto.Cipher import DES. Я подучаю ошибку:ModuleNotFoundError: No module named 'Crypto'.
Вопрос в другом:
1)модуль установлен:
Вывод консоли

PS C:\Users\User\Documents\sites\levelsite> pip install Crypto
Requirement already satisfied: Crypto in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (1.4.1)
Requirement already satisfied: Naked in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Crypto) (0.1.32)
Requirement already satisfied: shellescape in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Crypto) (3.8.1)
Requirement already satisfied: requests in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Naked->Crypto) (2.25.1)
Requirement already satisfied: pyyaml in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Naked->Crypto) (6.0.1)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->Crypto) (4.0.0)
Requirement already satisfied: idna<3,>=2.5 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->Crypto) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->Crypto) (1.26.2)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->CryptoPS C:\Users\User\Documents\sites\levelsite> pip3 install Crypto
Requirement already satisfied: Crypto in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (1.4.1)
Requirement already satisfied: Naked in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Crypto) (0.1.32)
Requirement already satisfied: shellescape in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Crypto) (3.8.1)
Requirement already satisfied: requests in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Naked->Crypto) (2.25.1)
Requirement already satisfied: pyyaml in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Naked->Crypto) (6.0.1)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->Crypto) (4.0.0)
Requirement already satisfied: idna<3,>=2.5 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->Crypto) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->Crypto) (1.26.2)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->Crypto) (2020.12.5)
PS C:\Users\User\Documents\sites\levelsite> pip3.9 install Crypto
Requirement already satisfied: Crypto in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (1.4.1)
Requirement already satisfied: Naked in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Crypto) (0.1.32)
Requirement already satisfied: shellescape in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Crypto) (3.8.1)
Requirement already satisfied: requests in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Naked->Crypto) (2.25.1)
Requirement already satisfied: pyyaml in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Naked->Crypto) (6.0.1)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->Crypto) (4.0.0)
Requirement already satisfied: idna<3,>=2.5 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->Crypto) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->Crypto) (1.26.2)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests->Naked->Crypto) (2020.12.5)

2)Версия python верная:
PS C:\Users\User\Documents\sites\levelsite> & C:/Users/User/AppData/Local/Microsoft/WindowsApps/python3.9.exe c:/Users/User/Documents/sites/levelsite/flask_app.py
  • Вопрос задан
  • 374 просмотра
Решения вопроса 1
@Everything_is_bad
pip install Crypto
ты ставишь какую-то левую библиотеку, открой доки и прочитай как правильно ставить требуемую тебе, точнее выясни какое у нее название для pip
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы