Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Upgrade for Raspbian (not an issue; request for advice only) #102

Closed
baqwas opened this issue Apr 21, 2020 · 4 comments
Closed

Version Upgrade for Raspbian (not an issue; request for advice only) #102

baqwas opened this issue Apr 21, 2020 · 4 comments
Labels
feedback comments or feedback

Comments

@baqwas
Copy link

baqwas commented Apr 21, 2020

Hello @DanielGoldfarb,

I'm running mplfinance on Raspberry Pi Zero under Raspbian Buster because I have easy access to this hardware that I have dedicated for unattended operations 24x7 ):

`$ cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7

Hardware : BCM2835
Revision : 9000c1
Serial : 00000000
Model : Raspberry Pi Zero W Rev 1.1
pi@raspbari3:~ $ uname -a
Linux raspbari3 4.19.97+ #1294 Thu Jan 30 13:10:54 GMT 2020 armv6l GNU/Linux
$
I installed **mplfinance** using standard _pip_ operation as follows (sudo is superfluous but old habits die hard):sudo python3 -m pip install mplfinance`

The process installed mplfinance v0.11

Please add a paragraph or two in your installation section of the documentation on how to upgrade using the github repository. As you can understand I am a novice at these things and running ./setup.py did not work out at all for me. I am not planning to use Jupyter/IPython/Cython/etc. I will simply use cron to plot daily (with data from alphavantage) in batch mode and post the saved plots for review. If you feel that this is not the best way to use mplfinance, please do let me know and I will adjust according to your suggestions. Thanks again.

Kind regards.

@baqwas baqwas added the feedback comments or feedback label Apr 21, 2020
@DanielGoldfarb
Copy link
Collaborator

DanielGoldfarb commented Apr 21, 2020

Please try

pip install --upgrade mplfinance

Let me know if that works for you. You should get version 0.12.3a3

Regarding:

Please add a paragraph or two in your installation section of the documentation on how to upgrade using the github repository.

That's a good idea. I will try to include some documentation along those lines in the near future.

Also, I see no problem using cron to run a batch Python script that calls mplfinance to generate a plot and save it to a file. That should work fine (assuming data is available at the time the job runs, etc.) I would just recommend that you log some details of what you are doing in the script, both before and after the plot. That way, if something goes wrong (since you may not be around when it runs) the log will help you track down what went wrong.

@DanielGoldfarb
Copy link
Collaborator

If you want to install the version GitHub that has not yet been released to PyPi, there are a couple ways to do that. If you already have the repository locally, you can do git pull to update the repository to the latest version. Alternatively you can just delete what you have and then again git clone the repository from GitHub.

Once you have the repository on your local machine, cd into the main mplfinance directory (the one that contains setup.py) and then run the following command:

pip install . <enter>

notice the dot '.' after pip install


If you ever want to experiment with making changes to the mplfinance code, locally on your machine, you can do the same as the above, but then run:

pip install --editable . <enter>

The --ediatable flag will make it so that your installed version will point to your local repository. This means that any changes you make will automatically be reflected in the installed version.

@DanielGoldfarb
Copy link
Collaborator

DanielGoldfarb commented Apr 21, 2020

Note: The fact that you are using version v0.11 also explains this issue as there were certain conditions where the x-axis labels display would get clipped; That bug was fixed in a later version. Please pick up v0.12.3a3 from Pypi (pip install --upgrade mplfinance).

Also, note that v0.12.4a0 will be released in approximately one week (but is partially available now on GitHub). See #67 for more information.

@baqwas
Copy link
Author

baqwas commented Apr 22, 2020

Hello @DanielGoldfarb,

You are correct once again! Having realized that --upgrade didn't work for me, in my naive ignorance, I ran setup.py directly not via pip. After reading your instructions, I ran it through pip as you suggested and now I am exactly where I would like to be with the tutorials. Many, many thanks for your help. Just for the record (in case it helps others, I have posted below the differences in my two approaches).

Kind regards.

pi@raspbari3:~/projects/quants $ sudo python3 -m pip install --upgrade mplfinance Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already up-to-date: mplfinance in /usr/local/lib/python3.7/dist-packages (0.11.0) Requirement already satisfied, skipping upgrade: matplotlib in /usr/lib/python3/dist-packages (from mplfinance) (3.0.2) pi@raspbari3:~/projects/quants $ cd ../mplfinance pi@raspbari3:~/projects/mplfinance $ ls build doc LICENSE readme.ipynb setup.py tests dist examples readme_files README.md src tox.ini pi@raspbari3:~/projects/mplfinance $ sudo python3 -m pip install . Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Processing /home/pi/projects/mplfinance Requirement already satisfied: matplotlib in /usr/lib/python3/dist-packages (from mplfinance==0.12.3a5) (3.0.2) Collecting pandas (from mplfinance==0.12.3a5) Downloading https://www.piwheels.org/simple/pandas/pandas-1.0.3-cp37-cp37m-linux_armv6l.whl (31.2MB) 100% |████████████████████████████████| 31.2MB 2.6kB/s Requirement already satisfied: python-dateutil>=2.6.1 in /usr/lib/python3/dist-packages (from pandas->mplfinance==0.12.3a5) (2.7.3) Requirement already satisfied: numpy>=1.13.3 in /usr/lib/python3/dist-packages (from pandas->mplfinance==0.12.3a5) (1.16.2) Collecting pytz>=2017.2 (from pandas->mplfinance==0.12.3a5) Downloading https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl (509kB) 100% |████████████████████████████████| 512kB 169kB/s Building wheels for collected packages: mplfinance Running setup.py bdist_wheel for mplfinance ... done Stored in directory: /tmp/pip-ephem-wheel-cache-xbvgx8jq/wheels/0b/41/f4/12a8e8019035bdf6b35c6c2e9754e93ac617d1b4f43bb452dd Successfully built mplfinance Installing collected packages: pytz, pandas, mplfinance Found existing installation: mplfinance 0.11.0 Uninstalling mplfinance-0.11.0: Successfully uninstalled mplfinance-0.11.0 Successfully installed mplfinance-0.12.3a5 pandas-1.0.3 pytz-2019.3 pi@raspbari3:~/projects/mplfinance $
pi@raspbari3:~/projects/mplfinance $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" pi@raspbari3:~/projects/mplfinance $

@baqwas baqwas closed this as completed Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback comments or feedback
Projects
None yet
Development

No branches or pull requests

2 participants