python 新手,尝试 pip install curl_cffi ,报错:
Could not find a version that satisfies the requirement curl_cffi (from versions: )
No matching distribution found for curl_cffi
python --version 显示:Python 2.7.17
然后尝试 pip3 install curl_cffi ,安装成功了,然后运行 test.py:
from curl_cffi import requests
r = requests.get("https://tls.browserleaks.com/json", impersonate="chrome101")
print(r.json())
python3 test.py 报错如下:
Traceback (most recent call last):
File "test.py", line 1, in <module>
from curl_cffi import requests
ImportError: cannot import name 'requests'
python3 --version 显示:Python 3.6.9
请问这该怎么解决?