Installation - Orbital-Knewbie/Knewbie GitHub Wiki
Prerequisites
Windows only
Pre-Installation
Rationale
Due to the convenience of the Linux command line, and the fact that the developers are primarily using Windows, it was decided that WSL was chosen as the CLI with which this application is developed. As such, the instructions given will be mostly catered to the WSL environment, but Windows commands will also be covered. macOS is currently not covered in this guide. Please contact the developers if you can assist with the macOS commands.
Python 3.6 was also chosen for development as it is the default version used on Ubuntu - the Linux distribution WSL uses.
While other Python 3 versions should still be able to support the application, their compatibility is not guaranteed and the developers suggest using Python 3.6 to mitigate possible issues one can run into.
Some common errors
Setting up on WSL notably produces some errors if the installation steps were to be taken immediately. This section will try to help prevent this by providing the commands taken before the actual installation.
- A common
apt hook
error that appears on WSL can be fixed by removing it. You may want to save a backup just in case.
WSL only
sudo rm -rf /etc/apt/apt.conf.d/20snapd.conf
- Due to the Common Build Problems using
pyenv
, if using Ubuntu/WSL, there is a need to install packages before getting started. See this StackOverflow answer for more information regarding the commands used.
Ubuntu/WSL only
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
sudo apt-get remove python3.6
cd /tmp && wget https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tgz
tar -xvf Python-3.6.10.tgz
cd Python-3.6.10 && ./configure
make && sudo make install
Successfully installing Python 3.6.10 should return you a screen similar to the one shown below.
Installing
Commands given should be carried out on the command line. Commands were tested on Windows and WSL. As mentioned previously, Python 3.6 was used for development.
- Clone this repo and enter the folder.
Both Linux/WSL and Windows
git clone https://github.com/Orbital-Knewbie/Knewbie
cd Knewbie
You should see a screen similar to the one below.
- Install, then create a Python 3
virtualenv
Linux/WSL only
sudo pip3 install virtualenv
virtualenv -p python3 venv
Windows only
pip install virtualenv
virtualenv venv
- Enter
virtualenv
.
Linux/WSL only
source venv/bin/activate
Entering the
virtualenv
Windows only
venv\Scripts\activate
- Install dependencies. If there are missing modules, it can likely be fixed with
pip install
. This step installs all dependencies (external packages) that were used in the development of the web application.
Both Linux/WSL and Windows
pip install -r requirements.txt
Successful Installation of
requirements.txt
packages
- Set the environment variable. Note that there is no spacing around
=
.
Linux/WSL only
export FLASK_APP=run.py
Windows only
set FLASK_APP=run.py
- Run the application.
Both Linux/WSL and Windows
flask run
- Open up
localhost:5000
on a browser of your choice. You should see the homepage. For users, do read the User Guide (Educator) or User Guide (Student) for guidance on the web application usage. For developers please read the Developer Guide for Design and Implementation details. Read the Development Practices to learn about the Project Management and Technical Development frameworks used in the project.
Built With
- Flask - The web framework used