ModuleNotFoundError: No module named 'pyfolio'

Course Name: Day Trading Strategies for Beginners, Section No: 7, Unit No: 1, Unit type: Notebook

Hallo,

I tried to import ‘pyfolio’ and get this message - ModuleNotFoundError: No module named ‘pyfolio’. Can you please advise?

Thank you.

Best regards

Hi,
If you are using the local system, it seems the pyfolio python library is not installed or not properly installed.
As you know, the library pyfolio developed by Quantopian can become unstable.

This is why we install pyfolio reloaded which is essentially the same library but maintained in a better manner. If you are working on your local system, then you can open jupyter notebook and in a new line try
pip install pyfolio-reloaded

Further, if you get error when you try pf.create_simple_tear_sheet(data.strategy_returns) then as a fix, before you call the line of code
pf.create_simple_tear_sheet(data.strategy_returns) add the following line
pd.Series.iteritems = pd.Series.items

Hope this helps

It works. Thank you.