1

I am running Python 2.7 on Ubuntu 16. I have install matplotlib, but I'm getting the following error when I run a Python script. Any idea?

Here is the version number for matplotlib Version: 2.2.0

Traceback (most recent call last):
  File "stock/app.py", line 24, in <module>
    import scan
  File "/home/ubuntu/eyefin/stock/scan.py", line 6, in <module>
    from stock.chart import get_chart
  File "/home/ubuntu/eyefin/stock/chart.py", line 4, in <module>
    from matplotlib.finance import candlestick_ohlc
ImportError: No module named finance

Here is my Python script

import os
import re

from matplotlib.finance import candlestick_ohlc
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from matplotlib.dates import num2date, date2num
import numpy as np
import matplotlib.dates
import pandas
from stock.models import Pricing, Symbol, Peak
from stock.utils import Utils

def get_chart(symbol_obj, title=None, caption=None):

    ...
user1187968
  • 7,154
  • 16
  • 81
  • 152
  • 1
    `matplotlib.finance` is not part of matplotlib any more. You may get a copy of it as `mpl_finance` from GitHub as seen [here](https://stackoverflow.com/questions/44700715/how-to-fix-mpl-finance-package-for-matplotlib). – ImportanceOfBeingErnest Mar 14 '18 at 23:24

0 Answers0