✍Tips and Tricks in Python

How to install mlfinlab without error messages?

Ke Gui
2 min readJun 28, 2020
Photo by Dave Gandy under the Public Domain Dedication License

Warning: There is no magical formula or Holy Grail here, though a new world might open the door for you.

Note 1: If you are reading Advances in Financial Machine Learning by Marcos Prado. 7. Fractionally Differentiated Features is Chapter 5 about Fractionally Differentiated Features. 8. Data Labelling is Chapter 3 about The Triple-barrier Method. And 9. Meta-labeling is Chapter 3.6 on page 50.

Note 2: a few new books in 2020 on this topic:

I have tried to install mlfinlab with no success. The requirements file from repository doesn’t works so well as most of the libraries package inside are out of date. Especially, if you don’t have SCS library ready.

The first thing is to create a new enviroment by following the steps from:

if you are using jupyter lab, first of all, will need to create new enviroment with python==3.7, (currently mlfinlab only supported by python 3.7 and 3.6)

conda create -n mlfinlab python=3.7

then, will need to install scs library if you don’t have. I have tried this

pip install scs

and it didn’t work out and gave some error messages. If that is case, try

conda install -c conda-forge scs

another one is

conda install -c anaconda ecos

after that , you can upgrade all the packages up to date with

conda upgrade --all

somehow, you may need to install jupyter lab, ipython and talos.

--

--

Ke Gui
Ke Gui

Written by Ke Gui

An ordinary guy who wants to be the reason someone believes in the goodness of people. He is living at Brisbane, Australia, with a lovely backyard.

No responses yet