![]() |
Pinkfish package - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Pinkfish package (/thread-26828.html) Pages:
1
2
|
Pinkfish package - buunaanaa - May-15-2020 I am trying to install the "pinkish" package. in Anaconda navigator ---> environments -----> base(root) I already installed "pinkish" package. but when I am running the code: import pandas as pd import numpy as np import os from pandas import DataFrame from datetime import datetime import matplotlib.pyplot as plt import csv import requests import matplotlib.pyplot as plt import matplotlib.dates as mdates import matplotlib as mpl %matplotlib inline from matplotlib.pylab import rcParams import seaborn as sns import pandas_datareader as dr # # import pinkfish as pf # # what would be solutions?
RE: Pinkfish package - snippsat - May-15-2020 Issue report RE: Pinkfish package - buunaanaa - May-15-2020 I understand the pandas.io.data is removed. I installed the pink fish 0.5.1 which is the latest version I installed both pandas 1.0.1 pandas-datareader 0.8.1 I am new to programming. I don't think i can edit the package? what would be the workaround? (May-15-2020, 06:20 AM)snippsat Wrote: Issue report RE: Pinkfish package - snippsat - May-15-2020 Do pip install pandas_datareader Now open file D:\programs\anaconda3\lib\site-packages\pinkfish\ fetch.py .Change and save. #from pandas.io.data import DataReader from pandas_datareader.data import DataReaderNow will import pinkfish as pf work,it give deprecated Waring,but that can just ignore.
RE: Pinkfish package - buunaanaa - May-15-2020 You are amazing. this worked. (May-15-2020, 06:31 PM)snippsat Wrote: Do I have another issue with the pinkish package the full code is here: full code when get to this line: elif (tlog.num_open_trades() == 0 and row.sma50 > row.sma200 and ts['sma50'][i-1] <= ts['sma200'][i-1]): I know I need to do something with D:\programs\anaconda3\lib\site-packages\pinkfish\trade.py return pd.isnull(self._tlog).any(1).nonzero()[0] and D:\programs\anaconda3\lib\site-packages\pandas\core\generic.py return object.__getattribute__(self, name) I google searched, but cannot seem to find an answer to my specific question. RE: Pinkfish package - snippsat - May-15-2020 Try. #return pd.isnull(self._tlog).any(1).nonzero()[0] return pd.isnull(self._tlog).any(1).to_numpy().nonzero()[0]A other option had to been running in a virtual environment. Then clone Repo and install requirements.txt git clone https://github.com/fja05680/pinkfish.git pip install -r requirements.txtNow will running with versions that was used when this was made. RE: Pinkfish package - buunaanaa - May-16-2020 (May-15-2020, 10:04 PM)snippsat Wrote: Try. Thank you very much for your time. I tried return pd.isnull(self._tlog).any(1).to_numpy().nonzero()[0] still have error message I tried nonempty to replace nonzero still not working. I also tried to downgrade the pandas to 0.24.2. then I ran into so many other error codes on my existing code. so a downgrade pandas is not a good option I think. I was reading at pandas.pydata.org, didn't see much info regarding to_numpy().nonzero()[0] is there any alternative ? RE: Pinkfish package - snippsat - May-16-2020 (May-16-2020, 04:48 PM)buunaanaa Wrote: Is there any alternative ?Yes there is,so this a Notebook i run as test. As you see no errors. Some step this will create a virtual environment with conda . I use cmder but commands are just the same in cmd .You may need to install git # Make G:\Anaconda3\Scripts λ conda create --name pink_env # Activate G:\Anaconda3\Scripts λ activate pink_env # Cd to pink (pink_env) G:\Anaconda3\Scripts λ cd .. (pink_env) G:\Anaconda3 λ cd envs\pink_env\ (pink_env) G:\Anaconda3 λ cd envs\pink_env\ # Clone Repo (pink_env) G:\Anaconda3\envs\pink_env λ git clone https://github.com/fja05680/pinkfish.git # Remove these 3 from requirements.txt save as req.txt importlib-metadata==0.18 empyrical==0.5.3 TA-Lib==0.4.17 # Install req.txt (pink_env) G:\Anaconda3\envs\pink_env\pinkfish (master) λ conda install --file req.txt # new file req1.txt importlib-metadata==0.18 empyrical==0.5.3 # Install req1.txt with pip (pink_env) G:\Anaconda3\envs\pink_env\pinkfish (master) λ pip install -r req1.txt # Install NoteBook (pink_env) G:\Anaconda3\envs\pink_env\pinkfish (master) λ conda install -c conda-forge jupyterlabFrom gohlke download TA_Lib‑0.4.18‑cp37‑cp37m‑win_amd64.whl # Install (pink_env) G:\Anaconda3\envs\pink_env\pinkfish (master) λ pip install TA_Lib-0.4.18-cp37-cp37m-win_amd64.whl Processing g:\anaconda3\envs\pink_env\pinkfish\ta_lib-0.4.18-cp37-cp37m-win_amd64.whl Installing collected packages: TA-Lib Successfully installed TA-Lib-0.4.18Finish ![]() # Start Jupyterlab (pink_env) G:\Anaconda3\envs\pink_env\pinkfish (master) λ jupyter lab RE: Pinkfish package - buunaanaa - May-16-2020 (May-15-2020, 10:04 PM)snippsat Wrote: Try. you have been amazing. I feel bad I am new and getting so many issues. after I ran [/python] install requirements.txt [/python] Here is the requirement file. [inline]appdirs==1.4.3 astroid==2.2.5 atomicwrites==1.3.0 attrs==19.1.0 certifi==2019.6.16 chardet==3.0.4 Click==7.0 colorama==0.4.1 configparser==3.7.4 coverage==4.5.3 cycler==0.10.0 empyrical==0.5.3 idna==2.8 importlib-metadata==0.18 ipython==7.11.1 isort==4.3.20 kiwisolver==1.1.0 lazy-object-proxy==1.4.1 lxml==4.3.4 matplotlib==3.1.0 mccabe==0.6.1 more-itertools==7.0.0 numpy==1.16.4 packaging==19.0 pandas==0.24.2 pandas-datareader==0.7.0 pluggy==0.12.0 py==1.8.0 pylint==2.3.1 pyparsing==2.4.0 pytest==4.6.3 pytest-cov==2.7.1 pytest-mock==1.10.4 python-dateutil==2.8.0 pytz==2019.1 requests==2.22.0 six==1.12.0 TA-Lib==0.4.17 toml==0.10.0 typed-ast==1.4.0 urllib3==1.25.3 wcwidth==0.1.7 wrapt==1.11.2 zipp==0.5.1[/inline] I found out pandas 0.24.2 won't solve the issue, I uninstalled the panda 0.24.2 and installed panda 1.0.3 suppose to work now but keep running into issues. i had bottleneck issue. it was solved after i installed the bottleneck package. etc... until i ran into a new error, some people suggest to uninstall pandas and reinstall it and it solved the issue. but mine didn't solve the issue...is there a way to restore to my original built before I ran the requirement when everything was working? RE: Pinkfish package - snippsat - May-16-2020 You are running on the main installation and not in a virtual environment. Quote:I found out pandas 0.24.2 won't solve the issue,All version will not match if not run i a virtual environment with version in requirements.txt. If mess up now it may not be so easy to fix at all,may be better to start on a new Anaconda installation or lighter Miniconda . Can try to see if conda can fix it,you most also look into what conda dos as it a very important part of Anaconda. pip uninstall pandas conda update pandasIf mess up in virtual environment as did one time testing this it dos not matter at all as can just delete the pink_env folder an start a new environment.Pinkfish all sudo install ![]() Had not look at install instruction which i don't like,it'only for Linux so it dos not matter. |