AI4Finance-Foundation / FinRL

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

ModuleNotFoundError: No module named 'finrl.neo_finrl.env_stock_trading' #391

Closed KSANTHOSH200 closed 2 years ago

KSANTHOSH200 commented 2 years ago

from finrl.apps import config from finrl.neo_finrl.preprocessor.yahoodownloader import YahooDownloader from finrl.neo_finrl.preprocessor.preprocessors import FeatureEngineer, data_split from finrl.neo_finrl.env_stock_trading.env_stocktrading import StockTradingEnv from finrl.drl_agents.stablebaselines3.models import DRLAgent from finrl.plot import backtest_stats, backtest_plot, get_daily_return, get_baseline

When trying to import these modules. I got the following ModuleNotFound:

ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_16444/220411286.py in 2 from finrl.neo_finrl.preprocessor.yahoodownloader import YahooDownloader 3 from finrl.neo_finrl.preprocessor.preprocessors import FeatureEngineer, data_split ----> 4 from finrl.neo_finrl.env_stock_trading.env_stocktrading import StockTradingEnv 5 from finrl.drl_agents.stablebaselines3.models import DRLAgent 6 from finrl.plot import backtest_stats, backtest_plot, get_daily_return, get_baseline

ModuleNotFoundError: No module named 'finrl.neo_finrl.env_stock_trading'

rayrui312 commented 2 years ago

Please change neo_finrl to finrl_meta. We have renamed it. Sorry for any inconvenience caused.

KSANTHOSH200 commented 2 years ago

Thanks for responding. It's same error for finrl_meta


ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_15892/1582257264.py in 2 from finrl.neo_finrl.preprocessor.yahoodownloader import YahooDownloader 3 from finrl.neo_finrl.preprocessor.preprocessors import FeatureEngineer, data_split ----> 4 from finrl.finrl_meta.env_stock_trading.env_stocktrading import StockTradingEnv 5 from finrl.drl_agents.stablebaselines3.models import DRLAgent 6 from finrl.plot import backtest_stats, backtest_plot, get_daily_return, get_baseline

ModuleNotFoundError: No module named 'finrl.finrl_meta'

rayrui312 commented 2 years ago

Have you updated to the newest version of FinRL? It seems that the codes are still using neo_finrl instead of finrl_meta.

KSANTHOSH200 commented 2 years ago

I am still getting the same issue. I am using 0.31 version

from finrl.apps import config from finrl.neo_finrl.preprocessor.yahoodownloader import YahooDownloader from finrl.neo_finrl.preprocessor.preprocessors import FeatureEngineer, data_split from finrl.finrl_meta.env_stock_trading.env_stocktrading import StockTradingEnv from finrl.drl_agents.stablebaselines3.models import DRLAgent from finrl.plot import backtest_stats, backtest_plot, get_daily_return, get_baseline


ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_4544/2828755724.py in 2 from finrl.neo_finrl.preprocessor.yahoodownloader import YahooDownloader 3 from finrl.neo_finrl.preprocessor.preprocessors import FeatureEngineer, data_split ----> 4 from finrl.finrl_meta.env_stock_trading.env_stocktrading import StockTradingEnv 5 from finrl.drl_agents.stablebaselines3.models import DRLAgent 6 from finrl.plot import backtest_stats, backtest_plot, get_daily_return, get_baseline

ModuleNotFoundError: No module named 'finrl.finrl_meta

rayrui312 commented 2 years ago

Maybe you are following the instructions in the documents? For tutorials in the latest version, please see the notebooks on Github instead of the documents. We are currently updating the documents. The document's code examples may be incompatible with the latest version now. Sorry for any inconvenience caused.

one11a commented 2 years ago

Hello,

Is this a possible moduel renaming error? Thank you for your replies. ModuleNotFoundError: No module named 'finrl.apps'

YangletLiu commented 2 years ago

Please use the latest codes, we did not update pypi very often. Yes, some renaming issues.

tjevgerres commented 2 years ago

No module named 'finrl_meta'

pinhaocheng commented 2 years ago

No module named 'finrl_meta'

It seems like they renamed finrl_meta to meta. I replaced all instances of finrl_meta with meta and that solved my problem.

daanquin commented 2 years ago

No module named 'finrl_meta'

It seems like they renamed finrl_meta to meta. I replaced all instances of finrl_meta with meta and that solved my problem.

Hi pinhaocheng!

Thanks so much for this answer. You just solved a headache I had for a whole day! Blessings to you.

mockingyin commented 1 year ago

Hi, May I ask what is the recent module name for finrl_meta ? I tried using meta but would get the same error. Thanks