Projects
Package Environments
Introduction
Libraries (or packages) are third-party software that you can use in your projects. You can use many of the available open-source libraries to complement the classes and methods that you create. Libraries reduce your development time because it's faster to use a pre-built, open-source library than to write the functionality. Libraries can be used in backtesting, research, and live trading. We support various libraries for machine learning, plotting, and data processing in QuantConnect Cloud. As members often request new libraries, we frequently add new libraries to the underlying docker image that runs the Lean engine.
This feature is primarily for Python algorithms, as not all Python libraries are not compatible with each other. We've bundled together different sets of libraries into distinct environments. To use the libraries of an environment, set the environment in your project and add the relevant using
import
statement of a library at the top of your file.
Set Environment
Follow these steps to set the library environment:
- Open a project.
- In the left navigation menu, click the
QuantConnect icon.
- In the Project panel, click the Python Foundation field and then select an environment from the drop-down menu.
Default Environment
The default environment supports the following libraries:
Warning: include(/tmp/docs/a03410b32e3a700b2ac6621621d754492a42ab54/Resources/libraries/supported-libraries-cloud.html): failed to open stream: No such file or directory in /tmp/docs/a03410b32e3a700b2ac6621621d754492a42ab54/02 Local Platform/08 Projects/09 Package Environments/03 Default Environment.php on line 2 Warning: include(): Failed opening '/tmp/docs/a03410b32e3a700b2ac6621621d754492a42ab54/Resources/libraries/supported-libraries-cloud.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/a03410b32e3a700b2ac6621621d754492a42ab54/02 Local Platform/08 Projects/09 Package Environments/03 Default Environment.php on line 2Pomegranate Environment
The Pomegranate environment supports the following libraries:
# Name Version absl-py 1.3.0 aeppl 0.0.33 aesara 2.7.9 aiodns 3.0.0 aiohttp 3.8.1 aiohttp-cors 0.7.0 aiosignal 1.3.1 alembic 1.9.1 alpaca-trade-api 2.3.0 alphalens-reloaded 0.4.2 altair 4.2.0 anyio 3.6.2 appdirs 1.4.4 arch 5.3.1 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arviz 0.14.0 asn1crypto 1.5.1 astropy 5.1 asttokens 2.2.1 astunparse 1.6.3 async-timeout 4.0.2 atari-py 0.2.9 attrs 22.2.0 autograd 1.5 autokeras 1.0.20 autopage 0.5.1 autoray 0.5.3 ax-platform 0.2.7.2 Babel 2.11.0 backcall 0.2.0 backports.zoneinfo 0.2.1 bayesian-optimization 1.2.0 beautifulsoup4 4.11.1 bleach 5.0.1 blessed 1.19.1 blis 0.7.9 bokeh 2.4.3 botorch 0.7.1 Bottleneck 1.3.5 cachetools 5.2.0 catalogue 2.0.8 catboost 1.0.6 ccxt 2.4.71 certifi 2022.12.7 cffi 1.15.1 cftime 1.6.2 chardet 4.0.0 charset-normalizer 2.0.4 click 7.1.2 cliff 4.1.0 cloudpickle 2.2.0 cmaes 0.9.0 cmd2 2.4.2 cmdstanpy 1.0.4 colorcet 3.0.1 colorful 0.5.5 colorlog 6.7.0 colorlover 0.3.0 comm 0.1.2 conda 22.11.1 conda-package-handling 1.9.0 confection 0.0.3 cons 0.4.5 convertdate 2.4.0 copulae 0.7.7 copulas 0.7.0 creme 0.6.1 cryptography 38.0.1 cufflinks 0.17.3 cvxopt 1.3.0 cvxpy 1.2.1 cycler 0.11.0 cymem 2.0.7 Cython 0.29.30 dask 2022.12.1 deap 1.3.3 debugpy 1.5.1 decorator 5.1.1 defusedxml 0.7.1 Deprecated 1.2.13 deprecation 2.1.0 dgl 0.9.0 dill 0.3.5.1 distlib 0.3.6 distributed 2022.12.1 dm-tree 0.1.8 docutils 0.19 dtw-python 1.2.2 dx 0.1.22 ecos 2.0.12 EMD-signal 1.2.3 empyrical 0.5.5 empyrical-reloaded 0.5.8 en-core-web-md 3.4.1 entrypoints 0.4 ephem 4.1.4 etils 0.9.0 etuples 0.3.8 exceptiongroup 1.1.0 exchange-calendars 4.2.4 executing 1.2.0 ezyrb 1.3.0.post2212 fastai 2.7.7 fastai2 0.0.30 fastcore 1.5.27 fastdownload 0.0.7 fastjsonschema 2.16.2 fastprogress 1.0.3 fasttext 0.9.2 featuretools 0.18.1 filelock 3.9.0 findiff 0.9.2 finrl 0.3.1 flatbuffers 22.12.6 fonttools 4.38.0 frozendict 2.3.4 frozenlist 1.3.3 fsspec 2022.11.0 future 0.18.2 fuzzy-c-means 1.6.3 gast 0.4.0 gensim 4.2.0 gluonts 0.7.7 google-api-core 2.11.0 google-auth 2.15.0 google-auth-oauthlib 0.4.6 google-pasta 0.2.0 googleapis-common-protos 1.57.0 gplearn 0.4.2 gpustat 1.0.0 GPUtil 1.4.0 gpytorch 1.9.0 graphviz 0.8.4 greenlet 2.0.1 grpcio 1.43.0 gym 0.23.1 gym-notices 0.0.8 h2o 3.36.1.4 h5py 3.7.0 HeapDict 1.0.1 hijri-converter 2.2.4 hmmlearn 0.2.7 holidays 0.18 holoviews 1.15.3 hopcroftkarp 1.2.5 html5lib 1.1 hurst 0.0.5 hvplot 0.8.1 hyperopt 0.2.7 idna 3.4 imageio 2.23.0 importlib-metadata 5.2.0 importlib-resources 5.10.1 iniconfig 1.1.1 ipykernel 6.19.4 ipython 8.7.0 ipython-genutils 0.2.0 ipywidgets 8.0.0rc1 jax 0.3.16 jaxlib 0.3.15 jedi 0.18.2 Jinja2 3.1.2 joblib 1.2.0 jqdatasdk 1.8.11 json5 0.9.10 jsonschema 4.9.1 jupyter 1.0.0 jupyter-console 6.4.4 jupyter-server 1.23.4 jupyter_client 7.4.8 jupyter_core 5.1.1 jupyterlab 3.4.4 jupyterlab-pygments 0.2.2 jupyterlab-widgets 3.0.5 jupyterlab_server 2.16.6 keras 2.10.0 Keras-Preprocessing 1.1.2 keras-rl 0.4.2 keras-tuner 1.1.3 kiwisolver 1.4.4 kmapper 2.0.1 korean-lunar-calendar 0.3.1 kt-legacy 1.0.4 langcodes 3.3.0 lazy_loader 0.1rc2 libclang 14.0.6 lightgbm 3.3.2 lime 0.2.0.1 line-profiler 3.5.1 linear-operator 0.1.1 littleutils 0.2.2 llvmlite 0.39.1 locket 1.0.0 logical-unification 0.4.5 LunarCalendar 0.0.9 lxml 4.9.1 lz4 4.0.2 Mako 1.2.4 Markdown 3.4.1 MarkupSafe 2.1.1 matplotlib 3.5.3 matplotlib-inline 0.1.6 miniKanren 1.0.3 mistune 2.0.4 mlxtend 0.20.0 mmh3 2.5.1 mock 5.0.0 modin 0.15.3 mpi4py 3.1.3 mplfinance 0.12.9b1 mpmath 1.2.1 msgpack 1.0.3 multidict 6.0.4 multipledispatch 0.6.0 multiprocess 0.70.13 multitasking 0.0.11 murmurhash 1.0.9 mxnet 1.9.1 nbclassic 0.4.8 nbclient 0.7.2 nbconvert 7.2.7 nbeats-keras 1.7.0 nbeats-pytorch 1.6.0 nbformat 5.7.1 nest-asyncio 1.5.6 netCDF4 1.6.2 networkx 2.8.8 neural-tangents 0.6.0 ninja 1.11.1 nltk 3.7 nose 1.3.7 notebook 6.5.2 notebook_shim 0.2.2 numba 0.56.0 numerapi 2.12.4 numpy 1.22.4 nvidia-ml-py 11.495.46 oauthlib 3.2.2 opencensus 0.11.0 opencensus-context 0.1.3 opencv-python 4.6.0.66 opt-einsum 3.3.0 optuna 2.10.1 osqp 0.6.2.post8 outdated 0.2.2 packaging 22.0 pandas 1.4.4 pandas-datareader 0.10.0 pandas-flavor 0.3.0 pandas-market-calendars 3.5 pandas-ta 0.3.14b0 pandocfilters 1.5.0 panel 0.14.0 param 1.12.3 parso 0.8.3 partd 1.3.0 pathos 0.2.9 pathy 0.10.1 patsy 0.5.3 pbr 5.11.0 PennyLane 0.25.1 PennyLane-Lightning 0.28.0 persim 0.3.1 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.3.0 pingouin 0.5.2 pip 22.0.4 pkgutil_resolve_name 1.3.10 platformdirs 2.6.1 plotly 5.9.0 pluggy 1.0.0 ply 3.11 pmdarima 1.8.5 polars 0.14.11 pomegranate 0.14.8 pox 0.3.2 ppft 1.7.6.6 pprofile 2.1.0 ppscore 1.2.0 preshed 3.0.8 prettytable 3.5.0 prometheus-client 0.13.1 prompt-toolkit 3.0.36 property-cached 1.6.4 prophet 1.1.1 protobuf 3.19.6 psutil 5.9.4 psycopg2-binary 2.9.5 ptvsd 4.3.2 ptyprocess 0.7.0 PuLP 2.6.0 pure-eval 0.2.2 py-heat 0.0.6 py-heat-magic 0.0.2 py-spy 0.3.14 py4j 0.10.9.7 pyaml 21.10.1 pyasn1 0.4.8 pyasn1-modules 0.2.8 pybind11 2.10.1 pycares 4.3.0 pycosat 0.6.4 pycparser 2.21 pyct 0.4.8 pydantic 1.9.2 pydevd-pycharm 201.8538.36 pydmd 0.4.0.post2209 pyerfa 2.0.0.1 pyfolio 0.9.2 pyfolio-reloaded 0.9.4 Pygments 2.13.0 pykalman 0.9.5 pyluach 2.0.2 pymc 4.1.4 pymdptoolbox 4.0b3 PyMeeus 0.5.12 PyMySQL 1.0.2 pynndescent 0.5.8 pyOpenSSL 22.0.0 pyparsing 3.0.9 pyperclip 1.8.2 pyportfolioopt 1.5.1 pyrb 1.0.1 pyro-api 0.1.2 pyro-ppl 1.8.2 pyrsistent 0.19.2 PySocks 1.7.1 pytest 7.2.0 python-dateutil 2.8.2 pytorch-ignite 0.4.10 pytz 2022.7 pytz-deprecation-shim 0.1.0.post0 pyvinecopulib 0.6.2 pyviz-comms 2.2.1 PyWavelets 1.3.0 PyYAML 6.0 pyzmq 24.0.1 qdldl 0.1.5.post2 qtconsole 5.4.0 QtPy 2.3.0 quadprog 0.1.11 quantecon 0.5.3 QuantLib 1.27 QuantStats 0.0.59 rauth 0.7.3 ray 2.0.0 regex 2022.10.31 requests 2.28.1 requests-oauthlib 1.3.1 retworkx 0.12.1 ripser 0.6.4 Riskfolio-Lib 3.3.0 riskparityportfolio 0.3 river 0.13.0 rpy2 3.5.3 rsa 4.9 ruamel.yaml 0.17.21 ruamel.yaml.clib 0.2.6 ruptures 1.1.7 rustworkx 0.12.1 scikit-image 0.19.3 scikit-learn 1.0.2 scikit-learn-extra 0.2.0 scikit-multiflow 0.5.3 scikit-optimize 0.9.0 scikit-tda 1.0.0 scipy 1.8.1 scs 3.2.2 sdeint 0.3.0 seaborn 0.11.2 semantic-version 2.10.0 Send2Trash 1.8.0 setuptools 56.0.0 setuptools-git 1.2 setuptools-scm 7.1.0 shap 0.41.0 simpy 4.0.1 six 1.16.0 sklearn-json 0.1.0 sktime 0.13.1 slicer 0.0.7 smart-open 6.3.0 sniffio 1.3.0 sortedcontainers 2.4.0 soupsieve 2.3.2.post1 spacy 3.4.1 spacy-legacy 3.0.10 spacy-loggers 1.0.4 SQLAlchemy 1.4.45 srsly 2.4.5 ssm 0.0.1 stable-baselines3 1.2.0 stack-data 0.6.2 statsmodels 0.13.2 stellargraph 1.2.1 stevedore 4.1.1 stochastic 0.7.0 stockstats 0.4.1 stumpy 1.11.1 sympy 1.11.1 ta 0.10.1 TA-Lib 0.4.18 tabulate 0.8.10 tadasets 0.0.4 tblib 1.7.0 tenacity 8.1.0 tensorboard 2.10.1 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorboardX 2.5.1 tensorflow 2.10.0 tensorflow-decision-forests 1.0.1 tensorflow-estimator 2.10.0 tensorflow-io-gcs-filesystem 0.29.0 tensorflow-probability 0.18.0 tensorly 0.7.0 tensortrade 1.0.3 termcolor 2.1.1 terminado 0.17.1 tf2jax 0.3.1 thinc 8.1.6 threadpoolctl 3.1.0 thriftpy2 0.4.16 tifffile 2022.10.10 tigramite 5.0.0.1 tinycss2 1.2.1 toml 0.10.2 tomli 2.0.1 toolz 0.12.0 torch 1.12.1 torch-cluster 1.6.0 torch-geometric 2.0.4 torch-scatter 2.0.9 torch-sparse 0.6.14 torch-spline-conv 1.2.1 torchvision 0.13.1 tornado 6.2 tqdm 4.64.1 trading-calendars 2.1.1 traitlets 5.8.0 tsfresh 0.15.1 tslearn 0.5.2 tweepy 4.10.0 typeguard 2.13.3 typer 0.3.2 typing_extensions 4.4.0 tzdata 2022.7 tzlocal 4.2 ujson 5.6.0 umap-learn 0.5.3 urllib3 1.24.3 virtualenv 20.17.1 wasabi 0.10.1 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 1.4.2 websockets 10.4 Werkzeug 2.2.2 wheel 0.37.1 widgetsnbextension 4.0.5 wrapt 1.14.1 wrds 3.1.2 wurlitzer 3.0.3 xarray 2022.6.0 xarray-einstats 0.4.0 xgboost 1.6.1 XlsxWriter 3.0.4 yarl 1.8.2 yfinance 0.2.3 zict 2.2.0 zipp 3.11.0
TensorFlow Environment
The TensorFlow environment supports the following libraries:
# Name Version absl-py 0.15.0 alphapy 2.5.0 anyio 3.6.2 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 asttokens 2.2.1 astunparse 1.6.3 attrs 22.2.0 Babel 2.11.0 backcall 0.2.0 beautifulsoup4 4.11.1 bleach 5.0.1 bokeh 3.0.3 cachetools 5.2.0 category-encoders 2.5.1.post0 certifi 2022.12.7 cffi 1.15.1 charset-normalizer 2.1.1 clang 5.0 cloudpickle 2.2.0 clr-loader 0.1.6 comm 0.1.2 contourpy 1.0.6 cycler 0.11.0 debugpy 1.6.4 decorator 5.1.1 defusedxml 0.7.1 empyrical 0.5.5 entrypoints 0.4 executing 1.2.0 fastjsonschema 2.16.2 flatbuffers 1.12 fonttools 4.38.0 gast 0.4.0 google-auth 2.15.0 google-auth-oauthlib 0.4.6 google-pasta 0.2.0 grpcio 1.51.1 gym 0.21.0 h5py 3.1.0 idna 3.4 iexfinance 0.5.0 imbalanced-learn 0.10.1 importlib-metadata 5.2.0 importlib-resources 5.10.1 ipykernel 6.19.4 ipython 8.7.0 ipython-genutils 0.2.0 jedi 0.18.2 Jinja2 3.1.2 joblib 1.2.0 json5 0.9.10 jsonschema 4.17.3 jupyter-server 1.23.4 jupyter_client 7.4.8 jupyter_core 5.1.1 jupyterlab 3.4.4 jupyterlab-pygments 0.2.2 jupyterlab_server 2.17.0 keras 2.6.0 Keras-Preprocessing 1.1.2 kiwisolver 1.4.4 lxml 4.9.2 Markdown 3.4.1 MarkupSafe 2.1.1 matplotlib 3.6.2 matplotlib-inline 0.1.6 mistune 2.0.4 msgpack 1.0.4 msgpack-numpy 0.4.8 nbclassic 0.4.8 nbclient 0.7.2 nbconvert 7.2.7 nbformat 5.7.1 nest-asyncio 1.5.6 notebook 6.5.2 notebook_shim 0.2.2 numpy 1.19.5 nvidia-cublas-cu11 11.10.3.66 nvidia-cuda-nvrtc-cu11 11.7.99 nvidia-cuda-runtime-cu11 11.7.99 nvidia-cudnn-cu11 8.5.0.96 oauthlib 3.2.2 opt-einsum 3.3.0 packaging 22.0 pandas 1.4.4 pandas-datareader 0.10.0 pandocfilters 1.5.0 parso 0.8.3 patsy 0.5.3 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.3.0 pip 22.0.4 pkgutil_resolve_name 1.3.10 platformdirs 2.6.1 prometheus-client 0.15.0 prompt-toolkit 3.0.36 protobuf 3.20.3 psutil 5.9.4 ptyprocess 0.7.0 pure-eval 0.2.2 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycparser 2.21 pyfolio 0.9.2 Pygments 2.13.0 pyparsing 3.0.9 pyrsistent 0.19.2 python-dateutil 2.8.2 pytz 2022.7 PyYAML 6.0 pyzmq 24.0.1 requests 2.28.1 requests-oauthlib 1.3.1 rsa 4.9 scikit-learn 1.2.0 scipy 1.4.1 seaborn 0.12.1 Send2Trash 1.8.0 setuptools 56.0.0 six 1.15.0 sniffio 1.3.0 soupsieve 2.3.2.post1 stable-baselines3 1.6.0 stack-data 0.6.2 statsmodels 0.13.5 tensorboard 2.11.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorflow 2.6.0 tensorflow-estimator 2.11.0 Tensorforce 0.6.5 termcolor 1.1.0 terminado 0.17.1 threadpoolctl 3.1.0 tinycss2 1.2.1 torch 1.13.1 tornado 6.2 tqdm 4.64.1 traitlets 5.8.0 typing-extensions 3.7.4.3 urllib3 1.26.13 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 1.4.2 Werkzeug 2.2.2 wheel 0.38.4 wrapt 1.12.1 xyzservices 2022.9.0 zipp 3.11.0
Request New Libraries
To request a new library, contact us. We will add the library to the queue for review and deployment. Since the libraries run on our servers, we need to ensure they are secure and won't cause harm. The process of adding new libraries takes 2-4 weeks to complete. View the list of libraries currently under review on the Issues list of the Lean GitHub repository.