FinRL icon indicating copy to clipboard operation
FinRL copied to clipboard

Can't install FinRL

Open BranoKusik opened this issue 2 years ago β€’ 19 comments

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.

BranoKusik avatar Mar 08 '23 03:03 BranoKusik

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

M-Colley avatar Mar 09 '23 01:03 M-Colley

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

zhumingpassional avatar Mar 09 '23 01:03 zhumingpassional

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).

CO0Oper avatar Mar 09 '23 02:03 CO0Oper

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.

BranoKusik avatar Mar 09 '23 02:03 BranoKusik

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

zhumingpassional avatar Mar 09 '23 02:03 zhumingpassional

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

BranoKusik avatar Mar 09 '23 02:03 BranoKusik

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)

M-Colley avatar Mar 09 '23 02:03 M-Colley

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

CO0Oper avatar Mar 10 '23 15:03 CO0Oper

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

Kadokoda avatar Mar 26 '23 05:03 Kadokoda

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.

ZCKAO avatar Mar 26 '23 15:03 ZCKAO

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

ndronen avatar Mar 26 '23 17:03 ndronen

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!

Kadokoda avatar Mar 27 '23 14:03 Kadokoda

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 avatar Mar 28 '23 01:03 zhumingpassional

fixed. pls try again

zhumingpassional avatar Mar 28 '23 06:03 zhumingpassional

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.

Kadokoda avatar Mar 29 '23 03:03 Kadokoda

@Kadokoda which notebook did you run?

zhumingpassional avatar Mar 29 '23 07:03 zhumingpassional

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.

Kadokoda avatar Mar 30 '23 06:03 Kadokoda

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

zhumingpassional avatar Mar 30 '23 07:03 zhumingpassional

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

Kadokoda avatar Mar 30 '23 08:03 Kadokoda