Different python programs, including Glyph’s back-end, require different dependencies. Your computer will quickly become a dystopian nightmare if you install all these different programs’ dependencies system-wide. To isolate environments for your python applications to run, you use virutalenv, a Python library. You’ll install virtualenv on your computer before running Glyph’s ‘start.command’, which when you run it the first time will set up a virtual environment inside the Glyph directory and install all necessary dependencies with pip.
Make sure you have virtualenv installed or install it if you don’t by opening terminal and typing ’sudo pip install virtualenv’. If you want to learn more about virtual environments or how to set them up, you can read this guide.
set-up
virtualenv
Pip is a package manager to organize Python libraries and modules. You want to have it installed because later we’re going to use it to install python libraries to a virtual environment that Glyph is going run happily inside.
Type ’pip’ in your Terminal. If you get a long list of a bunch of commands that you can make with pip, this means your computer knows what you’re talking about because pip is installed.
If it isn’t installed, install it following these instructions. This instruction guide will have you ( 1 ) download ‘get-pip.py’, a python script. To run ‘python get-pip.py’ like they tell you to, you have to ( 2 ) navigate to the directory where that file is using the ‘cd’ command we talked about in the Terminal post. As the instructions say, you might need “administrative access” to run this, which will require typing ‘sudo’ before this command, and/or typing in your computer password later– as in ( 3 ) ‘sudo python get-pip.py’.
set-up
pip
Your Mac comes with Python installed. Make sure everything’s good there. Open Terminal and type ’python -V’. If get the response: ‘Python 2.7.6’, you’re good. If you’re running another version of Python, like Python 3, know that Glyph isn’t tested on these, and you might want to change versions. To do so, try this out.
set-up
python