Warning: running OpenFisca on a machine with administrator privileges would make your life much easier. Using a MacOS or a Linux would be even better.
If you do not have a choice other than using a restricted Windows, this guide sums up the “recipe” to install OpenFisca in such an environment.
Git is a tool that will help you version your work. It also comes with a shell terminal that allows you to type commands in a more standard way than the Windows command line tool.
Python is the programing language used in OpenFisca. It can be installed without administrators rights through a software named Miniconda.
C:\Users\my-name\AppData\Local\Miniconda2
.echo 'MINICONDA_PATH="C:\Users\form\AppData\Local\Miniconda2"' >> .bashrc
echo 'function convert { echo /$1 | sed '\''s/\\/\//g'\'' | sed '\''s/://'\'' ; }' >> .bashrc
echo 'function add { export PATH=$(convert $1):$PATH ;}' >> .bashrc
echo 'add $MINICONDA_PATH' >> .bashrc
echo 'add "$MINICONDA_PATH/Scripts"' >> .bashrc
source .bashrc
conda create -n openfisca python=3.7 --offline --yes
echo 'source activate openfisca' >> .bashrc
source activate openfisca
To check that everything worked correctly, type in Git Bash:
pip --version
A version number should be printed, and no error message should appear. Congrats, you just set up a Python working environment!
windows
subdirectory. If you installed Python in 32 bits, right-click on 32-bits
. If you installed Python in 64 bits, right-click on the 64-bits
subdirectory. Choose “Git Bash Here”pip install *
To check that everything worked correctly, type in Git Bash:
python -c "from openfisca_france import CountryTaxBenefitSystem; CountryTaxBenefitSystem()"
No error message should appear. Congrats, you just installed OpenFisca-France!
Atom is a modern text editor that doesn’t require administrator priviledges to be installed. It will allow you to edit Python files with syntaxing coloring.
You can now write your own scripts, such as this tutorial.
To edit a script, open it with atom.
To run it, save your modifications, go to the directory containing it, right click and chose “Gith Bash Here”. Then type:
python name-of-the-script.py
In case you run into a problem, please open an issue.