Getting errors when downloading DxFeed-Python via pip
To Reproduce
Tried to download dxfeed in a CLEAN and NEW python environment
pip install dxfeed
Behavior
Building wheels for collected packages: dxfeed
Building wheel for dxfeed (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for dxfeed (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [262 lines of output]
Error compiling Cython file:
------------------------------------------------------------
...
# ctypedef static dxt.dxf_const_string_t DXF_ORDER_COMPOSITE_ASK_STR = L"COMPOSITE_ASK"
# cdef static dxt.dxf_const_string_t DXF_ORDER_COMPOSITE_BID_STR = "COMPOSITE_BID"
# cdef static dxt.dxf_const_string_t DXF_ORDER_COMPOSITE_ASK_STR = "COMPOSITE_ASK"
cdef dxt.dxf_const_string_t DXF_ORDER_COMPOSITE_BID_STR = "COMPOSITE_BID"
^
------------------------------------------------------------
dxfeed/core/pxd_include/EventData.pxd:391:62: Unicode literals do not support coercion to C types other than Py_UNICODE/Py_UCS4 (for characters) or Py_UNICODE* (for strings).
Error compiling Cython file:
------------------------------------------------------------
...
# cdef static dxt.dxf_const_string_t DXF_ORDER_COMPOSITE_BID_STR = "COMPOSITE_BID"
# cdef static dxt.dxf_const_string_t DXF_ORDER_COMPOSITE_ASK_STR = "COMPOSITE_ASK"
cdef dxt.dxf_const_string_t DXF_ORDER_COMPOSITE_BID_STR = "COMPOSITE_BID"
cdef dxt.dxf_const_string_t DXF_ORDER_COMPOSITE_ASK_STR = "COMPOSITE_ASK"
^
------------------------------------------------------------
dxfeed/core/pxd_include/EventData.pxd:392:62: Unicode literals do not support coercion to C types other than Py_UNICODE/Py_UCS4 (for characters) or Py_UNICODE* (for strings).
Error compiling Cython file:
------------------------------------------------------------
...
'by name in custom event handler.',
FutureWarning)
if sc.event_type_str == 'Trade':
event_handler.columns = lis.TRADE_COLUMNS
sc.listener = lis.trade_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:314:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'trade_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
if sc.event_type_str == 'Trade':
event_handler.columns = lis.TRADE_COLUMNS
sc.listener = lis.trade_default_listener
elif sc.event_type_str == 'Quote':
event_handler.columns = lis.QUOTE_COLUMNS
sc.listener = lis.quote_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:317:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'quote_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'Quote':
event_handler.columns = lis.QUOTE_COLUMNS
sc.listener = lis.quote_default_listener
elif sc.event_type_str == 'Summary':
event_handler.columns = lis.SUMMARY_COLUMNS
sc.listener = lis.summary_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:320:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'summary_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'Summary':
event_handler.columns = lis.SUMMARY_COLUMNS
sc.listener = lis.summary_default_listener
elif sc.event_type_str == 'Profile':
event_handler.columns = lis.PROFILE_COLUMNS
sc.listener = lis.profile_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:323:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'profile_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'Profile':
event_handler.columns = lis.PROFILE_COLUMNS
sc.listener = lis.profile_default_listener
elif sc.event_type_str == 'TimeAndSale':
event_handler.columns = lis.TIME_AND_SALE_COLUMNS
sc.listener = lis.time_and_sale_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:326:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'time_and_sale_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'TimeAndSale':
event_handler.columns = lis.TIME_AND_SALE_COLUMNS
sc.listener = lis.time_and_sale_default_listener
elif sc.event_type_str == 'Candle':
event_handler.columns = lis.CANDLE_COLUMNS
sc.listener = lis.candle_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:329:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'candle_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'Candle':
event_handler.columns = lis.CANDLE_COLUMNS
sc.listener = lis.candle_default_listener
elif sc.event_type_str == 'Order':
event_handler.columns = lis.ORDER_COLUMNS
sc.listener = lis.order_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:332:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'order_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'Order':
event_handler.columns = lis.ORDER_COLUMNS
sc.listener = lis.order_default_listener
elif sc.event_type_str == 'TradeETH':
event_handler.columns = lis.TRADE_COLUMNS
sc.listener = lis.trade_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:335:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'trade_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'TradeETH':
event_handler.columns = lis.TRADE_COLUMNS
sc.listener = lis.trade_default_listener
elif sc.event_type_str == 'SpreadOrder':
event_handler.columns = lis.ORDER_COLUMNS
sc.listener = lis.order_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:338:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'order_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'SpreadOrder':
event_handler.columns = lis.ORDER_COLUMNS
sc.listener = lis.order_default_listener
elif sc.event_type_str == 'Greeks':
event_handler.columns = lis.GREEKS_COLUMNS
sc.listener = lis.greeks_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:341:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'greeks_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'Greeks':
event_handler.columns = lis.GREEKS_COLUMNS
sc.listener = lis.greeks_default_listener
elif sc.event_type_str == 'TheoPrice':
event_handler.columns = lis.THEO_PRICE_COLUMNS
sc.listener = lis.theo_price_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:344:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'theo_price_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'TheoPrice':
event_handler.columns = lis.THEO_PRICE_COLUMNS
sc.listener = lis.theo_price_default_listener
elif sc.event_type_str == 'Underlying':
event_handler.columns = lis.UNDERLYING_COLUMNS
sc.listener = lis.underlying_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:347:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'underlying_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'Underlying':
event_handler.columns = lis.UNDERLYING_COLUMNS
sc.listener = lis.underlying_default_listener
elif sc.event_type_str == 'Series':
event_handler.columns = lis.SERIES_COLUMNS
sc.listener = lis.series_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:350:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'series_default_listener'.
Error compiling Cython file:
------------------------------------------------------------
...
elif sc.event_type_str == 'Series':
event_handler.columns = lis.SERIES_COLUMNS
sc.listener = lis.series_default_listener
elif sc.event_type_str == 'Configuration':
event_handler.columns = lis.CONFIGURATION_COLUMNS
sc.listener = lis.configuration_default_listener
^
------------------------------------------------------------
dxfeed/core/DXFeedPy.pyx:353:25: Cannot assign type 'void (int, dxf_const_string_t, const dxf_event_data_t *, int, void *) except * nogil' to 'dxf_event_listener_t' (alias of 'void (*)(int, dxf_const_string_t, const dxf_event_data_t *, int, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'configuration_default_listener'.
Downloading the "https://github.com/dxFeed/dxfeed-c-api/releases/download/8.3.0/dxfeed-c-api-8.3.0-macosx-no-tls.zip"
Extracting to "/private/var/folders/32/8ll51lk12fz8ktxw558cw5mw0000gn/T/pip-install-2th6tew5/dxfeed_eeed8dc486514c1fbf9624649458ab0d/dxfeed/tmp"
Copying all headers
Copying the required libraries
/private/var/folders/32/8ll51lk12fz8ktxw558cw5mw0000gn/T/pip-install-2th6tew5/dxfeed_eeed8dc486514c1fbf9624649458ab0d/dxfeed/tmp/dxfeed-c-api-8.3.0-no-tls/DXFeedAll-8.3.0-x64-no-tls/bin/x64/libDXFeed_64.dylib -> /private/var/folders/32/8ll51lk12fz8ktxw558cw5mw0000gn/T/pip-install-2th6tew5/dxfeed_eeed8dc486514c1fbf9624649458ab0d/dxfeed/core/libDXFeed_64.dylib
Compiling dxfeed/core/utils/helpers.pyx because it changed.
Compiling dxfeed/core/utils/handler.pyx because it changed.
Compiling dxfeed/core/listeners/listener.pyx because it changed.
Compiling dxfeed/core/DXFeedPy.pyx because it changed.
[1/4] Cythonizing dxfeed/core/DXFeedPy.pyx
Traceback (most recent call last):
File "/private/var/folders/32/8ll51lk12fz8ktxw558cw5mw0000gn/T/pip-install-2th6tew5/dxfeed_eeed8dc486514c1fbf9624649458ab0d/build.py", line 178, in <module>
extensions = cythonize(extensions, language_level=3)
File "/private/var/folders/32/8ll51lk12fz8ktxw558cw5mw0000gn/T/pip-build-env-ctueq24r/overlay/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
cythonize_one(*args)
File "/private/var/folders/32/8ll51lk12fz8ktxw558cw5mw0000gn/T/pip-build-env-ctueq24r/overlay/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: dxfeed/core/DXFeedPy.pyx
Traceback (most recent call last):
File "/Users/ananda/Desktop/DxFeed_Repair/.venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/ananda/Desktop/DxFeed_Repair/.venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/ananda/Desktop/DxFeed_Repair/.venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/private/var/folders/32/8ll51lk12fz8ktxw558cw5mw0000gn/T/pip-build-env-ctueq24r/overlay/lib/python3.9/site-packages/poetry/core/masonry/api.py", line 58, in build_wheel
return WheelBuilder.make_in(
File "/private/var/folders/32/8ll51lk12fz8ktxw558cw5mw0000gn/T/pip-build-env-ctueq24r/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 88, in make_in
wb.build(target_dir=directory)
File "/private/var/folders/32/8ll51lk12fz8ktxw558cw5mw0000gn/T/pip-build-env-ctueq24r/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 123, in build
self._build(zip_file)
File "/private/var/folders/32/8ll51lk12fz8ktxw558cw5mw0000gn/T/pip-build-env-ctueq24r/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 172, in _build
self._run_build_script(self._package.build_script)
File "/private/var/folders/32/8ll51lk12fz8ktxw558cw5mw0000gn/T/pip-build-env-ctueq24r/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 262, in _run_build_script
subprocess.check_call([self.executable.as_posix(), build_script])
File "/opt/homebrew/Cellar/python@3.9/3.9.19/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/ananda/Desktop/DxFeed_Repair/.venv/bin/python3.9', 'build.py']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dxfeed
Failed to build dxfeed
ERROR: Could not build wheels for dxfeed, which is required to install pyproject.toml-based projects
Expected behavior
A successful installation of dxfeed via pip
Environment:
OS: macOS Sonoma Version 14.5 (Apple M3 Pro)
Python version: 3.9.19
Package version: 0.5.3
Note: to get package version run import pkg_resources; pkg_resources.get_distribution('dxfeed').version
Additional context
Not sure if it is the C-compiler issue, when i tried to build it from source using poetry, i get another issue which is exactly the same as #50
Describe the bug
To Reproduce
Behavior
Expected behavior
Environment:
Note: to get package version run
import pkg_resources; pkg_resources.get_distribution('dxfeed').version
Additional context Not sure if it is the C-compiler issue, when i tried to build it from source using poetry, i get another issue which is exactly the same as #50