timeplus-io / proton-python-driver

Python driver for Proton which support Proton native wire protocol
Other
10 stars 3 forks source link

pip install proton-driver failed with MS VC build tool required error on Win11 Enterprise #46

Open sharpwell opened 4 months ago

sharpwell commented 4 months ago

Describe the bug I use Windows 11 Enterprise, when I was trying to run pip install proton-driver in the VS code IDE terminal. the installing failed with below message (the output was trimmed and last part as below): river\compression copying proton_driver\compression\zstd.py -> build\lib.win-amd64-cpython-310\proton_driver\compression copying proton_driver\compression__init.py -> build\lib.win-amd64-cpython-310\proton_driver\compression creating build\lib.win-amd64-cpython-310\proton_driver\dbapi copying proton_driver\dbapi\connection.py -> build\lib.win-amd64-cpython-310\proton_driver\dbapi copying proton_driver\dbapi\cursor.py -> build\lib.win-amd64-cpython-310\proton_driver\dbapi copying proton_driver\dbapi\errors.py -> build\lib.win-amd64-cpython-310\proton_driver\dbapi copying proton_driver\dbapi\extras.py -> build\lib.win-amd64-cpython-310\proton_driver\dbapi copying proton_driver\dbapi__init.py -> build\lib.win-amd64-cpython-310\proton_driver\dbapi creating build\lib.win-amd64-cpython-310\proton_driver\numpy copying proton_driver\numpy\block.py -> build\lib.win-amd64-cpython-310\proton_driver\numpy copying proton_driver\numpy\helpers.py -> build\lib.win-amd64-cpython-310\proton_driver\numpy copying proton_driver\numpy\result.py -> build\lib.win-amd64-cpython-310\proton_driver\numpy copying proton_driver\numpy__init.py -> build\lib.win-amd64-cpython-310\proton_driver\numpy creating build\lib.win-amd64-cpython-310\proton_driver\settings copying proton_driver\settings\available.py -> build\lib.win-amd64-cpython-310\proton_driver\settings copying proton_driver\settings\types.py -> build\lib.win-amd64-cpython-310\proton_driver\settings copying proton_driver\settings\writer.py -> build\lib.win-amd64-cpython-310\proton_driver\settings copying proton_driver\settings__init__.py -> build\lib.win-amd64-cpython-310\proton_driver\settings creating build\lib.win-amd64-cpython-310\proton_driver\streams copying proton_driver\streams\compressed.py -> build\lib.win-amd64-cpython-310\proton_driver\streams copying proton_driver\streams\native.py -> build\lib.win-amd64-cpython-310\proton_driver\streams copying proton_driver\streams\init__.py -> build\lib.win-amd64-cpython-310\proton_driver\streams creating build\lib.win-amd64-cpython-310\proton_driver\util copying proton_driver\util\compat.py -> build\lib.win-amd64-cpython-310\proton_driver\util copying proton_driver\util\escape.py -> build\lib.win-amd64-cpython-310\proton_driver\util copying proton_driver\util\helpers.py -> build\lib.win-amd64-cpython-310\proton_driver\util copying proton_driver\util\init__.py -> build\lib.win-amd64-cpython-310\proton_driver\util creating build\lib.win-amd64-cpython-310\proton_driver\columns\numpy copying proton_driver\columns\numpy\base.py -> build\lib.win-amd64-cpython-310\proton_driver\columns\numpy copying proton_driver\columns\numpy\datecolumn.py -> build\lib.win-amd64-cpython-310\proton_driver\columns\numpy
copying proton_driver\columns\numpy\datetimecolumn.py -> build\lib.win-amd64-cpython-310\proton_driver\columns\numpy
copying proton_driver\columns\numpy\floatcolumn.py -> build\lib.win-amd64-cpython-310\proton_driver\columns\numpy
copying proton_driver\columns\numpy\intcolumn.py -> build\lib.win-amd64-cpython-310\proton_driver\columns\numpy copying proton_driver\columns\numpy\lowcardinalitycolumn.py -> build\lib.win-amd64-cpython-310\proton_driver\columns\numpy copying proton_driver\columns\numpy\service.py -> build\lib.win-amd64-cpython-310\proton_driver\columns\numpy copying proton_driver\columns\numpy\stringcolumn.py -> build\lib.win-amd64-cpython-310\proton_driver\columns\numpy
copying proton_driver\columns\numpy\
init__.py -> build\lib.win-amd64-cpython-310\proton_driver\columns\numpy running build_ext building 'proton_driver.bufferedreader' 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/ [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for proton-driver Running setup.py clean for proton-driver Failed to build proton-driver ERROR: Could not build wheels for proton-driver, which is required to install pyproject.toml-based projects

Per Googling, I manually downloaded the corresponding whl file from github and install it as below, and driver installed successfully
pip install proton_driver-0.2.10-cp310-cp310-win_amd64.whl Processing c:\users\kui_liu\pythonproject\proton_driver-0.2.10-cp310-cp310-win_amd64.whl Requirement already satisfied: pytz in c:\users\kui_liu\pythonproject.venv\lib\site-packages (from proton-driver==0.2.10) (2024.1)
Collecting tzlocal (from proton-driver==0.2.10) Using cached tzlocal-5.2-py3-none-any.whl.metadata (7.8 kB) Requirement already satisfied: tzdata in c:\users\kui_liu\pythonproject.venv\lib\site-packages (from tzlocal->proton-driver==0.2.10) (2024.1) Using cached tzlocal-5.2-py3-none-any.whl (17 kB) Installing collected packages: tzlocal, proton-driver Successfully installed proton-driver-0.2.10 tzlocal-5.2 PS C:\Users\Kui_Liu\pythonproject> pip install proton-driver Requirement already satisfied: proton-driver in c:\users\kui_liu\pythonproject.venv\lib\site-packages (0.2.10) Requirement already satisfied: pytz in c:\users\kui_liu\pythonproject.venv\lib\site-packages (fr) (2024.1) Requirement already satisfied: tzlocal in c:\users\kui_liu\pythonproject.venv\lib\site-packages (from proton-driver) (5.2) Requirement already satisfied: tzdata in c:\users\kui_liu\pythonproject.venv\lib\site-packages (from tzlocal->proton-driver) (2024.1)

To Reproduce Run pip install proton-driver

Expected behavior Driver installation should success.

Versions OS: Window 11 Enterprise, Python version: 3.10