Error Pushing To Heroku with 2captcha library - ModuleNotFoundError: No module named 'requests'
pip
first downloads all modules and later install them. So when pip
downloads 2captcha
then requests
is already downloaded but not installed. And this makes problem.
You have to first install all modules except 2captcha
and later install only 2captcha
. OR first install only requests
and later other modules.
EDIT:
I can't test it but in documentation you can see that it can use also setup.py
to install modules. But I don't know if it will run both setup.py
and requirements
or only one of them.
On local computer in venv
I installed both using setup.py
from setuptools import setupsetup( install_requires=['requests', 'wheel'],)import subprocesssubprocess.run('python -m pip install 2captcha-python', shell=True)
and running python setup.py install
(but Heroku
should run it automatically)
Later I will test it on Heroku
when I refresh my account.