Hello, QuantConnect Community

i'm trying to run python script in research environment, python code works fine in notebook, but not working if running from command line like this:

`python test.py`

test.py

from AlgorithmImports import *
import pandas as pd
from datetime import date
import json
qb = QuantBook()
stock = qb.AddEquity('AAPL')
history = qb.History(stock.Symbol, date(2021, 1, 1), date(2021, 4, 1), Resolution.Daily)
df = history.reset_index().assign(date=lambda x: (x.time - pd.Timestamp('1970-01-01'))//pd.Timedelta('1ms'))
df1 = df[['date','open','high','low','close']]
ohlc = df1.values.tolist()
df2 = df[['date','volume']]
volume = df2.values.tolist()
result = {'ohlc': ohlc,'volume': volume}
str = json.dumps(result)
print(str)

there's error message:

# python test.py
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    from AlgorithmImports import *
  File "/Lean/Launcher/bin/Debug/AlgorithmImports.py", line 23, in <module>
    from clr import AddReference
  File "/Lean/Launcher/bin/Debug/clr.py", line 6, in <module>
    load()
  File "/Lean/Launcher/bin/Debug/pythonnet/__init__.py", line 36, in load
    set_default_runtime()
  File "/Lean/Launcher/bin/Debug/pythonnet/__init__.py", line 22, in set_default_runtime
    set_runtime(clr_loader.get_mono())
  File "/opt/miniconda3/lib/python3.8/site-packages/clr_loader/__init__.py", line 19, in get_mono
    libmono = find_libmono(sgen)
  File "/opt/miniconda3/lib/python3.8/site-packages/clr_loader/util/find.py", line 71, in find_libmono
    raise RuntimeError("Could not find libmono")
RuntimeError: Could not find libmono

it seems i missed some sort of setup, how can i make this work?

thank you!

Regards

Jin Yang