I constantly find myself rewriting these instructions over and over again, so I figured that I'll write 'em once and reference this document when needed.
- There is a file in the root directory named
requirements.txt
. This file should be hold all of the packages required for the project. This file can be generated by runningpip freeze > requirements.txt
on UNIX based systems. - That the project is using Python 3. Most of my projects are written in Python 3, so this condition will usually be true. If this not the case, it will be explictly written as such in the
README.md
. The only major change to use Python 2 is to replacepython=3
withpython=2
when the step comes.
If you already have pip installed (Just try running pip
from the command line), simply
run pip install -r requirements.txt
.
If not, then you will have to install pip
. You can either just install pip
by itself,
but we recommend installing anaconda
, which will sandbox your python installation so that
it won't interfere with anything else on your system.
Install anaconda
for your respective operating system by following this. Once conda
is installed, create a new conda environment that uses python 3. For most systems, this is done by conda create --name <ENV NAME> python=3
. In this case, <ENV NAME>
can be whatever you want; usually, I make it the name of my project.
After the environment has been properly set up, run source activate <ENV NAME>
to activate the environment. You should see a (<ENV NAME>)
on the very left of your prompt. Then run pip install -r requirements.txt
.