🤬
  • ■ ■ ■ ■ ■
    README.md
    skipped 141 lines
    142 142  sudo pip-3.4 install numpy requests selenium Faker
    143 143  ```
    144 144   
    145  -I also like MacPorts for native builds, so I might also use:
     145 +## macOS
     146 + 
     147 +The [MacPorts](https://www.macports.org) install command is:
    146 148   
    147 149  ```
    148 150  sudo port install py34-numpy py34-requests py34-psutil phantomjs psutil
    149 151  ```
    150 152   
    151  -Figure out how to install these libraries on your OS, and the script will run.
    152  - 
    153  - 
    154  -This is what was necessary on macOS:
     153 +This is what was also necessary on macOS:
    155 154   
    156 155  ```
    157 156  sudo port install phantomjs
    skipped 6 lines
    164 163  sudo ln -s xcodebuild xcrun
    165 164  ```
    166 165   
    167  -# Running on a headless computer (a computer a graphical interface)
    168  -phantomjs requires some graphical software, virtual or otherwise, so on a headless computer, you'll need the following system package and local package.
     166 +[Homebrew](../../../../Homebrew/brew) is another good option.
     167 + 
     168 +## Linux [Ubuntu16]
     169 + 
     170 +```
     171 +sudo apt-get install git
     172 +git clone https://github.com/essandess/isp-data-pollution.git
     173 +cd isp-data-pollution/
     174 +sudo apt install python3-pip
     175 +pip3 install --upgrade pip
     176 +pip3 install numpy
     177 +pip3 install psutil
     178 +sudo -H pip3 install psutil --upgrade
     179 +sudo -H pip3 install --upgrade pip
     180 +sudo -H pip3 install selenium
     181 +sudo -H pip3 install faker
     182 +sudo apt-get install fontconfig
     183 +sudo apt-get install libfontconfig
     184 +sudo apt-get install build-essential chrpath libssl-dev libxft-dev
     185 +sudo apt-get install libfreetype6 libfreetype6-dev
     186 +sudo apt-get install libfontconfig1 libfontconfig1-dev
     187 + 
     188 +export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
     189 +sudo mv $PHANTOM_JS /usr/local/share
     190 +ls /usr/local/share
     191 +sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
     192 +phantomjs --version
     193 +python3 isp_data_pollution.py
     194 +```
     195 + 
     196 +If you are behind a firewall, use `sudo -EH` to inherit `http_proxy` environment settings.
     197 + 
     198 +## Headless
     199 + 
     200 +`phantomjs` requires some graphical software, virtual or otherwise, so on a headless computer, you'll need the following system package and local package.
     201 + 
    169 202  If you're not using virtualenv (below) then run pip as sudo.
     203 + 
    170 204  ```
    171 205  sudo apt-get install xvfb
    172 206  pip install pyvirtualdisplay
    173 207  ```
    174 208   
    175  -# Installation through virtualenv
     209 +### Installation through virtualenv
    176 210   
    177 211  In order to isolate pip library files, virtualenv is convenient. If you prefer this method, you can follow the steps below:
    178 212  ```
    skipped 6 lines
Please wait...
Page is in error, reload to recover