amor71 / LiuAlgoTrader

Framework for algorithmic trading
MIT License
710 stars 120 forks source link

Pip install does not work out of the box with python 3.12 #405

Open elioscordo opened 2 weeks ago

elioscordo commented 2 weeks ago

Hello, the library is interesting but it is not installing out out the box with python 3.12. Did I miss anything?

Collecting empyrical (from liualgotrader)
  Using cached empyrical-0.5.5.tar.gz (52 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      /private/var/folders/x1/6mcvg0r923zb6s2nmx7d3ts80000gn/T/pip-install-u6pcrxn0/empyrical_c89cf57cb0d642cb8c059eb55c9dbc5f/versioneer.py:485: SyntaxWarning: invalid escape sequence '\s'
        LONG_VERSION_PY['git'] = '''
      Traceback (most recent call last):
        File "/Users/elio/projects/trading/alpaca/env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/elio/projects/trading/alpaca/env/lib/python3.12/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/elio/projects/trading/alpaca/env/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/x1/6mcvg0r923zb6s2nmx7d3ts80000gn/T/pip-build-env-sxewi4wx/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/x1/6mcvg0r923zb6s2nmx7d3ts80000gn/T/pip-build-env-sxewi4wx/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/x1/6mcvg0r923zb6s2nmx7d3ts80000gn/T/pip-build-env-sxewi4wx/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/x1/6mcvg0r923zb6s2nmx7d3ts80000gn/T/pip-build-env-sxewi4wx/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 79, in <module>
        File "/private/var/folders/x1/6mcvg0r923zb6s2nmx7d3ts80000gn/T/pip-install-u6pcrxn0/empyrical_c89cf57cb0d642cb8c059eb55c9dbc5f/versioneer.py", line 1473, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "/private/var/folders/x1/6mcvg0r923zb6s2nmx7d3ts80000gn/T/pip-install-u6pcrxn0/empyrical_c89cf57cb0d642cb8c059eb55c9dbc5f/versioneer.py", line 1406, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/x1/6mcvg0r923zb6s2nmx7d3ts80000gn/T/pip-install-u6pcrxn0/empyrical_c89cf57cb0d642cb8c059eb55c9dbc5f/versioneer.py", line 412, in get_config_from_root
          parser = configparser.SafeConfigParser()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
github-actions[bot] commented 2 weeks ago

Thank you for joining LiuAlgoTrader community and submitting your first issue. Feel free to check out Liu community: https://gitter.im/LiuAlgoTrader/community