The following steps should allow you to install
If you're using a Mac or Linux, then it is almost certain that you already have Python installed. You may also do if you are using Windows. To find out, open a command line window (run Terminal on a Mac, or
cmdon Windows) and then type
python(on Mac or Unix) or
If some text and a prompt (
>>>) appears then you have Python. Check the version number in the first line: if it doesn't start Python 2.7 then you currently need to install Python 2.7 to run the checker. You can have multiple versions of Python installed, but it is going to be more complicated than is covered here.
If you've got Python 2.7 then type
quit()and skip to step 4.
If you get a line that says the command is not found then you need to install Python. Download a copy from here:
The code is currently written to use Python 2.7, so make sure you download an installer for the most recent version of Python 2.7 and not the more recent Python 3 versions. For Windows, choose one of the MSI installer options.
Repeat the command line check from the first step: if this still doesn't work then you probably just need to tell the computer where to find Python: search online for instructions to add python to the
PATHenvironment variable. On Windows, you will want to add (using the typical install location)
safedata_validatorpackage requires some extra Python packages that may need to be installed. You can install of the required packages and
safedata_validatoritself using the
pippackage installer. At the command line, type:
pip install --user openpyxl requests simplejson shapely appdirs python-dateutil safedata_validator
The additional packages allow Python to: read Excel files, get validation data over the internet, handle JSON formatted data, validate WKT formatted GIS vector data, handle configuration file locations and parse dates more easily. If you want to install
safedata_validatorfor all users on a computer, you will need to remove
The package will have created a system command
safedata_validatethat you can use to validate a file from the command line. Open a command line terminal, and run the following:
You should now see the usage instructions.
In addition to the command line option, you should now be able to
import safedata_validatorwithin Python, which will allow you to use the Dataset class and methods defined in the package within your own code.