AI4Finance-Foundation/FinRL

Where does gymnasium is even mentionned?

adri1bard opened this issue · 1 comments

To Reproduce

Steps to reproduce the behavior:
{
Running this cell after all those before:
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import datetime

.%matplotlib inline
from finrl.config_tickers import DOW_30_TICKER
from finrl.meta.preprocessor.yahoodownloader import YahooDownloader
from finrl.meta.preprocessor.preprocessors import FeatureEngineer, data_split
from finrl.meta.env_stock_trading.env_stocktrading import StockTradingEnv
from finrl.agents.stablebaselines3.models import DRLAgent,DRLEnsembleAgent
from finrl.plot import backtest_stats, backtest_plot, get_daily_return, get_baseline

from pprint import pprint

import sys
sys.path.append("../FinRL-Library")

import itertools
}

Expected behavior

importing gymnasium obvuisly but i don't even see where gymnasium is mentioned

error

ModuleNotFoundError Traceback (most recent call last)
Cell In[9], line 10
8 get_ipython().run_line_magic('matplotlib', 'inline')
9 from finrl.config_tickers import DOW_30_TICKER
---> 10 from finrl.meta.preprocessor.yahoodownloader import YahooDownloader
11 from finrl.meta.preprocessor.preprocessors import FeatureEngineer, data_split
12 from finrl.meta.env_stock_trading.env_stocktrading import StockTradingEnv

File ~\PycharmProjects\pythonProject4\venv\lib\site-packages\finrl_init_.py:3
1 from future import annotations
----> 3 from finrl.test import test
4 from finrl.trade import trade
5 from finrl.train import train

File ~\PycharmProjects\pythonProject4\venv\lib\site-packages\finrl\test.py:8
6 from finrl.config import TEST_START_DATE
7 from finrl.config_tickers import DOW_30_TICKER
----> 8 from finrl.meta.env_stock_trading.env_stocktrading import StockTradingEnv
11 def test(
12 start_date,
13 end_date,
(...)
23 ):
24 # import data processor
25 from finrl.meta.data_processor import DataProcessor

File ~\PycharmProjects\pythonProject4\venv\lib\site-packages\finrl\meta\env_stock_trading\env_stocktrading.py:5
1 from future import annotations
3 from typing import List
----> 5 import gymnasium as gym
6 import matplotlib
7 import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'gymnasium'

Desktop :

  • OS: WIN 11 x64

Additional context

im running the notebook trough a pycharm project.

gymnasium is needed for StockTradingEnv (env_stocktrading.py) which is "A stock trading environment for OpenAI gym", and has modules:


import gymnasium as gym
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from gymnasium import spaces
from gymnasium.utils import seeding
from stable_baselines3.common.vec_env import DummyVecEnv

If you don't have it installed or imported that gives you an error