gpt4free
gpt4free copied to clipboard
ModuleNotFoundError: No module named 'Crypto'
Every time i run
python3 -m streamlit run streamlit_app.py
i get this error
ModuleNotFoundError: No module named 'Crypto'
Run this command
pip3 install pycryptodome
python 3.11 error ModuleNotFoundError: No module named 'Crypto'
I have the same error. module installation did not help((
The error occurs for multiple reasons:
1) Not having the pycryptodome package installed by running pip install pycryptodome.
2) Installing the package in a different Python version than the one you're using.
3) Installing the package globally and not in your virtual environment.
4) Your IDE running an incorrect version of Python.
5) Naming your module crypto.py which would shadow the official module.
6) Declaring a variable named Crypto which would shadow the imported variable.
Reference: Solution of this issue
python3 -m venv venv
# in windows
& d:/workspace/gpt4free/venv/Scripts/Activate.ps1
# mac or linux
. venv/bin/activate
pip3 install -r requirements.txt
# testing
mv .\testing\forefront_test.py .
py .\testing\forefront_test.py