For the most part, everything will be done using OS X's Terminal.
We need to install the following (in this order) to get up and running:
- Homebrew (a package manager for OS X)
- Python (via Homebrew)
- Virtualenv (via Python's pip)
- Virtualenvwrapper (also via Python's pip)
We'll also need to create/alter your .bash_profile
so that every time you open up a new Terminal window, you'll have access to these virtual environments and commands. The following will need to be added to whatever's already there or put inside a blank text file and saved as .bash_profile
inside of your user folder (/Users/<username>/
).
export WORKON_HOME=$HOME/Envs
source /usr/local/bin/virtualenvwrapper.sh
From there, we'll create a new virtual environment and install a few third-party Python libraries like Jupyter, requests and BeautifulSoup which can help with scraping tasks.
The whole virtual environment thing is probably overkill for someone just starting out; I don't even really run into situations where it's critical. It's something developers use to keep different versions of third-party libraries and their dependencies (other libraries that help them work) from conflicting with each other.
It's like starting with a clean slate. If you mess something up, it's typically going to be limited to the virtual environment, too, so you can just delete it and create another.
So what's the deal with virtualenvwrapper? It basically gives you a set of commands which make it much easier to hop in and out of these virtual environments.