6

How to install the mpl_finance package into the environment path on Anaconda?

I tried pip install mpl_finance but I still can't find the package on Anaconda, where did it go? I am pretty fresh in Python.

Daniel Goldfarb
  • 6,937
  • 5
  • 29
  • 61
jihao yu
  • 61
  • 1
  • 1
  • 2

3 Answers3

5
  1. Go to anaconda prompt
  2. Select your environment
  3. Run pip install mpl_finance

In your code, change matplotlib.finance to mpl_finance

regards

kalehmann
  • 4,821
  • 6
  • 26
  • 36
A Ki
  • 59
  • 1
  • 2
4

The mpl-finance (aka mpl_finance) package is deprecated. As of December 2019 there is a new version of matplotlib finance, with documentation. https://pypi.org/project/mplfinance/


Install with:

pip install --upgrade mplfinance

or

conda install -c conda-forge mplfinance


The new package name does NOT have the dash- or underscore_

It is now mplfinance (not mpl-finance, nor mpl_finance).

Dhaust
  • 5,470
  • 9
  • 54
  • 80
Daniel Goldfarb
  • 6,937
  • 5
  • 29
  • 61
  • 1
    Side question: how do you get Anaconda to add a new module to their installation catalog? – DISC-O Mar 21 '20 at 21:54
  • 1
    There is not yet a `conda` package for the new `mplfinance`. (Soon hopefully). In the meantime, if you use the `pip` that is within your conda environment, you can `pip install mplfinance` individually to each conda environment, and **it will work** in that conda environment, but it will **not** be conda managed, so the conda catalog will not display it as installed. – Daniel Goldfarb Mar 22 '20 at 04:49
  • 1
    I did that, but I want to tell Anaconda to speed up adding it. I also want them to be quicker with pandas, they limit me to 0.25 currently, 2-3 versions behind for such a key package. There seem to be ways around Anaconda dependencies for that too but too complicated (for me). – DISC-O Mar 22 '20 at 13:53
  • 1
    @DISC-O Not 100% sure, but as I understand things, it's up to each package maintainer to create a conda install-package. Therefore it's up to pandas maintainers to make a more recent version for conda, and it is up to me (as maintainer of mplfinance) to make mplfinance available for conda. I hope to do that in another two months (sooner if someone offers to help). These are generally volunteer projects that progress as people have time to work on them. Regarding pandas you can contact their maintainers possibly through Github. All the best. – Daniel Goldfarb Mar 22 '20 at 20:14
  • 1
    I have added an issue to create a conda install: https://github.com/matplotlib/mplfinance/issues/62 ... not sure when we'll get to it, but its there now so we don't forget. – Daniel Goldfarb Mar 26 '20 at 12:12
1

conda install -c conda-forge mplfinance

Jacob Lee
  • 4,405
  • 2
  • 16
  • 37