Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not import finrl in google colab #1249

Open
aleeOstovar opened this issue Jun 25, 2024 · 2 comments
Open

could not import finrl in google colab #1249

aleeOstovar opened this issue Jun 25, 2024 · 2 comments

Comments

@aleeOstovar
Copy link

this problem happened recently and i'm sure that last week was working fine
i'm developing my own strategies using finrl environment but tonight when i start to install and import dependencies i got "No module named 'finrl'". before i successfully installed these packages :
!pip install stockstats

## install finrl library

!pip install wrds
!pip install swig
!pip install -q condacolab
import condacolab
condacolab.install()
!apt-get update -y -qq && apt-get install -y -qq cmake libopenmpi-dev python3-dev zlib1g-dev libgl1-mesa-glx swig
!pip install git+https://github.com/AI4Finance-Foundation/FinRL.git

then import them as template:
import datetime

import gymnasium as gym
import numpy as np
import pandas as pd
import yfinance as yf
from stockstats import StockDataFrame as Sdf

import torch
import torch.nn as nn
from sklearn.preprocessing import MinMaxScaler

import itertools

from stable_baselines3 import PPO
from stable_baselines3.common.vec_env import DummyVecEnv
import matplotlib
import matplotlib.pyplot as plt

#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

error:

ModuleNotFoundError Traceback (most recent call last)
in <cell line: 21>()
19
20 #from finrl.agents.stablebaselines3.models import DRLAgent,DRLEnsembleAgent
---> 21 from finrl.plot import backtest_stats, backtest_plot, get_daily_return, get_baseline
22
23 from pprint import pprint

ModuleNotFoundError: No module named 'finrl'

@BruceYanghy
Copy link
Member

Thank you for bringing up the issue. Currently, the FinRL library is extremely poorly maintained. Rest assured, I will reorganize a team to ensure its proper maintenance.

Best regards,

Bruce Yang

@stellawang196
Copy link

Please try:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants