AI4Finance-Foundation / FinRL-Meta

FinRL­-Meta: Dynamic datasets and market environments for FinRL.
https://ai4finance.org
MIT License
1.31k stars 594 forks source link

FinRL-Meta won't install #177

Open eyast opened 2 years ago

happygaoxiao commented 2 years ago

There are many dependency conflicts when I run python setup.py install or pip install git+https://github.com/AI4Finance-Foundation/FinRL-Meta.git.

eyast commented 2 years ago

Can you share OS version, and the error messages you receive please- this will help with the troubleshooting as we stabilise the current version. Thank you @zhumingpassional @hoeckxer

happygaoxiao commented 2 years ago

I have tried FinRL, FinRL_Meta, and ElegantRL in Ubuntu 20.04 and Windows 11. Both of them are in a miniconda env with Python 3.8.

(1) Windows There seems to be a mismatch of Python modules or API names between FinRL-Meta and ElegantRL. Here are some errors when I run FinRL_MultiCrypto_Trading.ipynb

File D:\software\miniconda\envs\finance\lib\site-packages\elegantrl-0.3.3-py3.8.egg\elegantrl\train\run.py:95, in train_and_evaluate(args) 93 cwd = args.cwd 94 break_step = args.break_step ---> 95 horizon_len = args.horizon_len 96 if_allow_break = args.if_allow_break 97 if_off_policy = args.if_off_policy AttributeError: 'Arguments' object has no attribute 'horizon_len'

if I add horizon_len as the old ElegantRL codes here.

File D:\software\miniconda\envs\finance\lib\site-packages\elegantrl-0.3.3-py3.8.egg\elegantrl\train\run.py:102, in train_and_evaluate(failed resolving arguments) 100 if_train = True 101 while if_train: --> 102 trajectory, step = agent.explore_env(env, horizon_len, False) 103 steps += step 104 if if_off_policy: ValueError: too many values to unpack (expected 2)

(2) Ubuntu 20.04, kernel version 5.15.0-41-generic. When I run python setup.py install in the FinRL-Meta folder, I get the following errors.

Installed /home/xiao/miniconda3/envs/finrl/lib/python3.8/site-packages/meta-0.3.1-py3.8.egg Processing dependencies for meta==0.3.1 error: aiohttp 4.0.0a1 is installed but aiohttp==3.8.1 is required by {'alpaca-trade-api'}

If I try pip install git+https://github.com/AI4Finance-Foundation/FinRL-Meta.git.

ERROR: Cannot install meta==0.3.1 and stable-baselines3[extra]==1.5.0 because these package versions have conflicting dependencies. The conflict is caused by: meta 0.3.1 depends on gym==0.24.1 stable-baselines3[extra] 1.5.0 depends on gym==0.21 To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

If I modify the requirements.txt, I would get more dependency conflicts.

It seems that the notebook files are designed for Windows. It would be nice if you could help me by creating a new conda env and installing the latest version of FinRL, FinRL-Meta and ElegantRL. Then test if you could run all the notebook files. Thank you a lot.

Vankeee commented 2 years ago

Same problem on ubuntu 20.04

nexon33 commented 1 year ago

same problem windows 11

eyast commented 1 year ago

There is a lot of spaghetti interconnections that the team is trying to untangle. At this stage, I would recommend to download the code and import it relatively instead of installing it - most of it will load, some part will fail.

aSocialMenace commented 1 year ago

what should i do here to ensure a successful install?

ERROR: Cannot install alpaca_trade_api>=2.1.0 and vectorbt[full]==0.23.3 because these package versions have conflicting dependencies.

The conflict is caused by: The user requested alpaca_trade_api>=2.1.0 vectorbt[full] 0.23.3 depends on alpaca-trade-api==1.4.3

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict
oferkruzel commented 1 year ago

for me TA lib failed and caused vectorbt to fail. TA lib need to be installed manually from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib

icsl-Jeon commented 1 year ago

for me TA lib failed and caused vectorbt to fail. TA lib need to be installed manually from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib

Did you try conda install -c conda-forge ta-lib ?