AI4Finance-Foundation / FinRL

FinRL: Financial Reinforcement Learning. πŸ”₯
https://ai4finance.org
MIT License
9.73k stars 2.37k forks source link

Can't install FinRL #915

Open BranoKusik opened 1 year ago

BranoKusik commented 1 year ago

I got following issue during install finrl. ERROR: Package 'finrl' requires a different Python: 3.10.10 not in '<3.9,>=3.7' I have already git clone code and open Go to FinRL Folder, then py -m pip install . Please help me. Thank you for your kind attention.

M-Colley commented 1 year ago

Potentially because of https://github.com/AI4Finance-Foundation/FinRL/blob/master/pyproject.toml (Line 27)?

zhumingpassional commented 1 year ago

pls do not use pip intall finrl. git clone, and move finrl to your local dir

CO0Oper commented 1 year ago

Colab updated it's python version to Python 3.9.16, my runtime was interrupted sometime at noon today. I tried a couple of methods to revert the python version back to 3.8 but have no success so far (Sad).

BranoKusik commented 1 year ago

Thanks for your advice. I didn't install finrl in Global python, but I successfully installed in anaconda. -Update pyproject.toml as following: python = "^3.9" of line 28.

zhumingpassional commented 1 year ago

some developers said that, python 3.9 is not compatible with some libs. therefore, we set python < 3.9.

BranoKusik commented 1 year ago

But you know, python 3.10 is the best version for machine learning?

M-Colley commented 1 year ago

The fix works for Google Colab for the Stock_NeurIPS2018 example.

There is, however, an error:

cvxpy 1.2.3 requires setuptools<=64.0.2, but you have setuptools 67.6.0 which is incompatible.

--> Add requirement cvxpy >=1.3.0 (see https://github.com/cvxpy/cvxpy/releases/tag/v1.3.0; support up to Python 3.11)

CO0Oper commented 1 year ago

I'm able to install FinRL on colab again today!

Kadokoda commented 1 year ago

hi! Could you help with my installing on Colab? It was ok on Mar 23rd, but after that date i see the error. Thanks a lot for your help.

!pip install git+https://github.com/AI4Finance-Foundation/FinRL.git

error: subprocess-exited-with-error

Γ— python setup.py egg_info 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. Preparing metadata (setup.py) ... error error: metadata-generation-failed

ZCKAO commented 1 year ago

I have the same error msg on Colab and don’t know how to fix it yet.

  error: subprocess-exited-with-error

  Γ— python setup.py egg_info 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.
  Preparing metadata (setup.py) ... error
error: metadata-generation-failed

Γ— Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
ndronen commented 1 year ago

I tried, and got the same error on Colab. I looked at the instructions for how to use finrl on Colab. They're pretty bad, tbh. I created a notebook that appears to work. The tricks:

Kadokoda commented 1 year ago

I tried, and got the same error on Colab. I looked at the instructions for how to use finrl on Colab. They're pretty bad, tbh. I created a notebook that appears to work. The tricks:

  • Use conda on Colab.
  • Install the requisite .debs
  • Manually install wrds, because finrl doesn't list it as a dependency

thanks @ndronen! Your work around solved the error!

zhumingpassional commented 1 year ago

thanks for your effort @ndronen .

some libs may be updated, so that some errors are raised, and we have to update accordingly every several months.

we will update the notebooks later

zhumingpassional commented 1 year ago

fixed. pls try again

Kadokoda commented 1 year ago

hmmm. I still get following error @zhumingpassional : Collecting gym>=0.17 Downloading gym-0.21.0.tar.gz (1.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 77.5 MB/s eta 0:00:00 error: subprocess-exited-with-error

Γ— python setup.py egg_info 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. Preparing metadata (setup.py) ... error error: metadata-generation-failed

Γ— Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

zhumingpassional commented 1 year ago

@Kadokoda which notebook did you run?

Kadokoda commented 1 year ago

Thank so much @zhumingpassional! i was not updating the script. Now it's running ok but the session crashs so I can't run All cells, I need to Part 1 then other parts separately

Here is the message of Part 1: Install FinRL steps: WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv WARNING: Upgrading ipython, ipykernel, tornado, prompt-toolkit or pyzmq can cause your runtime to repeatedly crash or behave in unexpected ways and is not recommended. If your runtime won't connect or execute code, you can reset it with "Disconnect and delete runtime" from the "Runtime" menu. WARNING: prompt-toolkit > 1.0.16 is incompatible with IPython < 7.0 WARNING: The following packages were previously imported in this runtime: [cycler,dateutil,google,importlib_resources,kiwisolver,matplotlib,matplotlib_inline,mpl_toolkits,pexpect,pickleshare,prompt_toolkit,psutil,pygments,six,wcwidth,zipp] Run "pip install -U ipython" before restarting to avoid repeated crashes.

zhumingpassional commented 1 year ago

I guess the python version raises the error. if you use colab, pls refer to the installing instruction in https://github.com/AI4Finance-Foundation/FinRL/blob/master/examples/Stock_NeurIPS2018_SB3.ipynb

Kadokoda commented 1 year ago

thanks a lot @zhumingpassional! it's working perfectly!