Some preliminary documentation on setting up reports for the Consortium of Ohio Libraries
- Python3 will be used for scripting
- Utility server IP needs to be added for Sequoia DB access
- Add all cron jobs to
/etc/cron.d
- Virtual Environments virtualenv docs
- To create a virtual environment
virtualenv -p /usr/bin/python3 project_name
- To activate the virtual environment, navigate to the
/project_name
directory and type
source bin/activate
- Install any packages required for the project while in the virtual environment
pip install psycopg2
- To deactivate the environment, type
deactivate
- To see a list of packages in the environment, type:
pip list --format=columns
- To create a list of required packages, along with the required version of the package, for the project in the standard requirements.txt file, type:
pip freeze > requirements.txt
- If you need to recreate an environment using a requirements.txt file, type:
pip install -r requirements.txt
- Virtual environment must be created without Pip
pyvenv3 --without-pip project_name
- Activate the virtual environment, navigate to the
/project_name
directory and type
source bin/activate
- Grab Pip manually and install
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py