-
Notifications
You must be signed in to change notification settings - Fork 176
Getting set up
First, make sure you have the following installed:
- Visual Studio Code to develop and manage the repository code.
- Anaconda to manage Python versions.
- Git
When you install Anaconda, make sure to check the box that says "add to PATH" if you're on Windows. This makes sure that any terminal window can access the conda
command.
Next, make sure you're comfortable using a terminal window. If you open Visual Studio Code, you can open a sub-window with a terminal (try pressing Ctrl+Shift+P and then searching for 'terminal'). It should look something like this:
Importantly, make sure that you can run Python and Conda commands. The next step is to create an Anaconda environment with Python 3.7 installed. The command to do this is:
conda create -n policyengine python=3.7
You can call it whatever you like (instead of policyengine
). The important bit is the python=3.7
condition.
Then, you'll need to activate that environment with:
conda activate policyengine
If you got an error saying conda
isn't recognised, this is a common issue and it's caused by conda not being added to the environment variable list of whichever terminal you're using (probably Powershell, on Windows). Try following some of the solutions in this S.O. post.
If not, great. You can test everything's working fine by replicating the following below:
The only thing left to install is OpenFisca US. Open a terminal and type:
git clone https://github.com/PolicyEngine/openfisca-us
Then, open the openfisca-us
folder (not the openfisca_us
folder inside it) with Visual Studio Code (it'll be wherever your terminal is pointing). On my Ubuntu machine I can helpfully just run code openfisca-us
after running the git clone
command, but this might not be available on every machine.