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.
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: