2captcha / 2captcha-python

Python 3 package for easy integration with the API of 2captcha captcha solving service to bypass recaptcha, hcaptcha, сloudflare turnstile, funcaptcha, geetest and solve any other captchas.
https://pypi.org/project/2captcha-python
MIT License
550 stars 92 forks source link

Compile error #114

Closed darkgr closed 1 month ago

darkgr commented 1 month ago

Hello

pip3 install 2captcha-python

Downloading/unpacking 2captcha-python Downloading 2captcha_python-1.5.0-py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python3/dist-packages (from 2captcha-python) Installing collected packages: 2captcha-python *** Error compiling '/tmp/pip_build_root/2captcha-python/twocaptcha/api.py'... File "/tmp/pip_build_root/2captcha-python/twocaptcha/api.py", line 71 raise NetworkException(f'bad response: {resp.status_code}') ^ SyntaxError: invalid syntax

* Error compiling '/tmp/pip_build_root/2captcha-python/twocaptcha/solver.py'... File "/tmp/pip_build_root/2captcha-python/twocaptcha/solver.py", line 103 result = self.solve(method, **kwargs) ^ SyntaxError: invalid syntax

Successfully installed 2captcha-python Cleaning up...

pip3 -V

pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.4)

Cannot build the package under python 3.4. Whats wrong?

poplers24 commented 1 month ago

@darkgr Hello

The library uses f-strings. f-strings were introduced in Python 3.6, but you are using Python 3.4, which is causing the syntax error.

Please update Python to a later version, or at least version 3.6