First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Within the terminal, Fire this command:
which php
| import numpy as np | |
| import pandas as pd | |
| from pandas_datareader import data as web | |
| from sklearn import linear_model | |
| class ScikitBacktest(object): | |
| def __init__(self,sys): | |
| self.lags = 5 | |
| self.symbol = sys | |
| self.get_data() |
| First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py | |
| $ cd <download location> | |
| $ sudo -H ./get-pip.py | |
| Use pip to install pip3 | |
| $ sudo -H pip install pip3 | |
| Installing pip3 also installs Python3 | |
| To run Python3 | |
| $ python3 |
| ###### development tools | |
| sudo apt-get install build-essential python-dev git nodejs-legacy npm gnome-tweak-tool openjdk-8-jdk | |
| ### Python packages | |
| sudo apt-get install python-pip python-virtualenv python-numpy python-matplotlib | |
| ### pip packages | |
| pip install django flask django-widget-tweaks django-ckeditor beautifulsoup4 requests classifier SymPy ipython |