Closed BenDonnelly closed 2 years ago
I was running into the same issue.
A quick fix would be to manually run pip3 install requests
before installing requirements from the .txt
file. An alternative fix is to use v1.0.3 which does not seem to have this issue. Hope that we can get a real solution to this problem soon.
I guess there's a conflict between requests==2.13.0
in your requirements file and requests>=2.20.0
in requirements file of 2captcha-python
I guess there's a conflict between
requests==2.13.0
in your requirements file andrequests>=2.20.0
in requirements file of 2captcha-python
In that case usually pip shows a warning. I also tested with a requirements.txt
with no version requirements and it throws the same error. To reproduce you can create a new virtualenv and try pip install 2captcha-python
.
I guess there's a conflict between
requests==2.13.0
in your requirements file andrequests>=2.20.0
in requirements file of 2captcha-python
I'm using requests==2.25.1, but facing the same issue.
same error on Heroku, anybody found a solution?
I am getting the same error in a github actions pipeline, where the same code works localy.
Relevant logs
================================== log start ===================================
Collecting requests~=2.26.0
Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting boto3~=1.20.18
Downloading boto3-1.20.18-py3-none-any.whl (131 kB)
Collecting beautifulsoup4~=4.10.0
Downloading beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting opnieuw~=1.1.0
Downloading opnieuw-1.1.0-py3-none-any.whl (8.9 kB)
Collecting boto3-type-annotations~=0.3.1
Downloading boto3_type_annotations-0.3.1-py3-none-any.whl (338 kB)
Collecting cachetools~=4.2.4
Downloading cachetools-4.2.4-py3-none-any.whl (10 kB)
Collecting pyotp~=2.6.0
Downloading pyotp-2.6.0-py2.py3-none-any.whl (11 kB)
Collecting 2captcha-python~=1.1.0
Downloading 2captcha-python-1.1.0.tar.gz (8.8 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/runner/work/awsapilib/awsapilib/.tox/py37/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qjx6s4xz/2captcha-python_26a35daaee5f47ac953b9f05b9f5ca83/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qjx6s4xz/2captcha-python_26a35daaee5f47ac953b9f05b9f5ca83/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-23lv1u5x
cwd: /tmp/pip-install-qjx6s4xz/2captcha-python_26a35daaee5f47ac953b9f05b9f5ca83/
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-qjx6s4xz/2captcha-python_26a35daaee5f47ac953b9f05b9f5ca83/setup.py", line 4, in <module>
from twocaptcha import __version__
File "/tmp/pip-install-qjx6s4xz/2captcha-python_26a35daaee5f47ac953b9f05b9f5ca83/twocaptcha/__init__.py", line 1, in <module>
from .api import ApiClient
File "/tmp/pip-install-qjx6s4xz/2captcha-python_26a35daaee5f47ac953b9f05b9f5ca83/twocaptcha/api.py", line 3, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/39/ad/5939251435bf7f47293eded6341ef8d4299aff623270be8c71da7fe9e205/2captcha-python-1.1.0.tar.gz#sha256=57a68523240ec91f280bf6fa72ad2dc673009e5c40d5d89ca5d352a0f8c8f83f (from https://pypi.org/simple/2captcha-python/) (requires-python:>=3.6). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement 2captcha-python~=1.1.0 (from versions: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0)
ERROR: No matching distribution found for 2captcha-python~=1.1.0
fixed with #28 in v1.1.1 thanks to @nathanielobrown
Hey,
I am having problems using this package with docker compose.
This is my requirements file:
When doing
docker-compose up
I get the following error:It looks like the error is coming a 2captcha-python module.
Please could you investigate?