The Python scripts included on this website should run exactly the same on any operating system, provided that all of the required libraries are installed. Guides are given below for installing python and getting started on Windows or Ubuntu:
test.py (python) ↓ (GitHub) - Right click and Save Link As... to download.
This is a test script which can be used to ensure your computer can run Python scripts and has all of the required libraries installed. The script imports various libraries, and provides a success message after each import. You can run this script using the command below in a Terminal window (see the guides above for more details).
python test.py
The following libraries are imported as required packages. They should be installed on any University computer by default; if you are using your own computer, you may need to manually install some of them. If after running test.py your setup fails to import of any of these, you can probably install them by running the command:
pip install library_name
from the command line (terminal). If this doesn't work, please contact alan.m.lewis@york.ac.uk for support.
Required Libraries:
datetime
pathlib
csv
numpy
sys
os
matplotlib
glob
scipy
pandas
The following packages are also imported, which are used with only a small number of scripts. If your setup reports that any of these libraries have not imported this is not usually a problem.
serial
sklearn
For instance, serial, is used for some scripts which interact with hardware in the laboratory. If you have issues with scripts using serial, please consult a demonstrator in the lab.