我想使用以下方式安装Twint:
它说:
我已经尝试了很多在这个 Stack Overflow讨论中提到的方法,但没有一个对我有效。
pip install twint
但是它失败了并生成了这个错误:
ERROR: Command errored out with exit status 1:
command: 'c:\users\ramda\appdata\local\programs\python\python39\python.exe' -u
-c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ramda\\AppData\\Local\\Temp\\pip-install-lbx86gde\\pycares\\setup.py'"'"';
__file__='"'"'C:\\Users\\ramda\\AppData\\Local\\Temp\\pip-install-lbx86gde\\pycares\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ramda\AppData\Local\Temp\pip-record-itnmxqui\install-record.txt'
--single-version-externally-managed --compile --install-headers 'c:\users\ramda\appdata\local\programs\python\python39\Include\pycares'
cwd: C:\Users\ramda\AppData\Local\Temp\pip-install-lbx86gde\pycares\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\pycares
copying src\pycares\errno.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\utils.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\_version.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\__init__.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\__main__.py -> build\lib.win-amd64-3.9\pycares
running build_ext
generating cffi module 'build\\temp.win-amd64-3.9\\Release\\_cares.c'
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
building '_cares' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\users\ramda\appdata\local\programs\python\python39\python.exe' -u
-c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ramda\\AppData\\Local\\Temp\\pip-install-lbx86gde\\pycares\\setup.py'"'"';
__file__='"'"'C:\\Users\\ramda\\AppData\\Local\\Temp\\pip-install-lbx86gde\\pycares\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ramda\AppData\Local\Temp\pip-record-itnmxqui\install-record.txt'
--single-version-externally-managed --compile --install-headers 'c:\users\ramda\appdata\local\programs\python\python39\Include\pycares' Check the logs for full command output.
它说:
但是我已经在我的机器上安装了 Microsoft Visual C++ 14.*。实际上,当我尝试重新安装它时,它会显示“已经安装在您的计算机上”或类似的消息。错误:需要 Microsoft Visual C++ 14.0 或更高版本。请使用“Microsoft C++ 构建工具”获取它。
我已经尝试了很多在这个 Stack Overflow讨论中提到的方法,但没有一个对我有效。