AI4Finance-Foundation / FinRL

FinRL: Financial Reinforcement Learning. 🔥
https://ai4finance.org
MIT License
9.48k stars 2.31k forks source link

Poetry install doesn't work #954

Open dancju opened 1 year ago

dancju commented 1 year ago

Describe the bug I can't install dependencies with Poetry.

To Reproduce Steps to reproduce the behavior:

  1. poetry env use 3.9
  2. poetry lock
  3. poetry install

Screenshots Poetry reports that numpy is not installed before scipy, which is not true, because I have confirmed numpy is already installed.

  • Installing scipy (1.6.1): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel

  Error: 'numpy' must be installed before running the build.

  at /opt/homebrew/Cellar/poetry/1.4.2/libexec/lib/python3.11/site-packages/poetry/installation/chef.py:152 in _prepare
      148│ 
      149│                 error = ChefBuildError("\n\n".join(message_parts))
      150│ 
      151│             if error is not None:
    → 152│                 raise error from None
      153│ 
      154│             return path
      155│ 
      156│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with scipy (1.6.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "scipy (==1.6.1)"'.

Env