From 3de424682fa1e55bc0d7282832b44840b34ef849 Mon Sep 17 00:00:00 2001 From: Miguel BarĂ£o Date: Sun, 5 Feb 2023 18:50:11 +0000 Subject: [PATCH] update README.md --- README.md | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 9b7695a..98b3614 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,13 @@ Each of these steps is explained below. ### Install python3 with sqlite3 support -Minimum supported version is python3.8. The installed versions depend on the +Minimum supported version is python3.9. The installed versions depend on the operating system default. ```sh -sudo pkg install python3 py38-sqlite3 # FreeBSD +sudo pkg install python3 py39-sqlite3 # FreeBSD sudo apt install python3 # Linux (Ubuntu) -sudo port install python310 # MacOS +sudo port install python311 # MacOS ``` ### Install pip @@ -35,21 +35,20 @@ sudo port install python310 # MacOS Install `pip` from the system package manager: ```sh -sudo pkg install py38-pip # FreeBSD +sudo pkg install py39-pip # FreeBSD sudo apt install python3-pip # Linux (Ubuntu) -sudo port install py310-pip # MacOS +sudo port install py311-pip # MacOS ``` -In the end you should be able to run `pip --version` and `python3 -c "import -sqlite3"` without errors. -In some systems, `pip` can be named `pip3`, `pip3.8` or `pip-3.8`, etc. +In the end you should be able to run `python3 -m pip --version` and `python3 -c +"import sqlite3"` without errors. Packages should **not** be installed system-wide. Either install them to a python virtual environment or in the user area. -To install in the user area use `pip install --user some_package` or edit the -configuration file `~/.config/pip/pip.conf` (FreeBSD, Linux) or -`Library/Application Support/pip/pip.conf` (MacOS) and add the lines +To install in the user area use `python3 -m pip install --user some_package` or +edit the configuration file `~/.config/pip/pip.conf` (FreeBSD, Linux) or +`~/Library/Application Support/pip/pip.conf` (MacOS) and add the lines ```ini [global] @@ -59,13 +58,13 @@ user = yes ### Install aprendizations ```sh -pip install git+https://git.xdi.uevora.pt/mjsb/aprendizations.git +python3 -m pip install git+https://git.xdi.uevora.pt/mjsb/aprendizations.git ``` Python packages are usually installed in: -* `~/.local/lib/python3.8/site-packages/` in Linux/FreeBSD. -* `~/Library/python/3.10/lib/python/site-packages/` in MacOS. +* `~/.local/lib/python3.9/site-packages/` in Linux/FreeBSD. +* `~/Library/python/3.11/lib/python/site-packages/` in MacOS. When aprendizations is installed with pip, all the dependencies are also installed. @@ -75,7 +74,7 @@ installed in ```sh ~/.local/bin # Linux/FreeBSD -~/Library/Python/3.10/bin # MacOS +~/Library/Python/3.11/bin # MacOS ``` and can be run from the terminal: @@ -108,12 +107,12 @@ openssl req -x509 -newkey rsa:4096 -keyout privkey.pem -out cert.pem -days 365 - Install the certbot from LetsEncrypt: ```sh -sudo pkg install py38-certbot # FreeBSD +sudo pkg install py39-certbot # FreeBSD sudo apt install certbot # Ubuntu ``` To generate or renew the certificates, ports 80 and 443 must be accessible. -**Any firewall and webserver have to be stopped**. +**The firewall and webserver have to be stopped**. ```sh sudo certbot certonly --standalone -d www.example.com # first time @@ -155,8 +154,8 @@ The default password is equal to the user name, if left undefined. ### Running the demo -The application includes a small example in `demo/courses.yaml` that can be used -for initial testing. Run it with +The application includes a small example in `demo/courses.yaml` that can be +used for initial testing. Run it with ```sh cd demo @@ -208,12 +207,12 @@ Example configuration files are in the `freebsd` directory. Make sure the following steps have been done: -* installed python3 and pip -* installed aprendizations using pip +* install python3 and pip +* install aprendizations using pip * initialized database with at least 1 user * generate and copy certificates to the appropriate place -* (optional) configure the firewall to do port forwarding -* run `aprendizations courses.yaml --check` +* (optional) configure the firewall and port forwarding +* run `aprendizations courses.yaml` ## Keeping aprendizations updated -- libgit2 0.21.2