-
python3.X
-
pip (reference Python package manager)
Linux:
> python3 -m pip install --user --upgrade pip
Windows:
> py -m pip --version
-
venv (should be already installed with python3)
-
Inside app folder create a pyton3 virtual enviornment:
> python3 -m venv env
-
Activate your virtual environment:
> source env/bin/activate
In order to run db.py you need to install:
-
Flask :
pip3 install flask
-
sqlalchemy:
pip3 install sqlalchemy
-
mysqlclient:
pip3 install mysqlclient
-
If you got an error
Failed building wheel for sqlalchemy
at step B.2 you should runpip3 install wheel
and then try again from step 2. -
If you got an error
Failed building wheel for mysqlclient
at step B.3 then run the following commands:- Install the Python and MySQL development headers and libraries:
sudo apt-get install python-dev default-libmysqlclient-dev
- If you are using python3 then you need to install python3-dev using the following command:
sudo apt-get install python3-dev
- Install from PyPI:
pip install mysqlclient
- Then continue to section D
- Install the Python and MySQL development headers and libraries:
-
Important: Execute postgradb.sql file on your local mysql server in order to install postgraDB as a database on your computer
mysql> source /you_path_to_postgradb_sql_file/postgradb.sql
-
Important: Open db.py script and modify
mysql:url
(line:6) by inserting your username and password that you use on your local mysql server:create_engine("mysql://<you_username_here>:<your_password_here>@localhost/postgradb?host=localhost?port=3306")
-
Run
python3 db.py
-
Open you browser
-
Type
127.0.0.1:5000/
a) In search page user can search universities by uni_id like ("ETH, auth, Duth etc.")
b) In search page user can search available programs (by domain) using any keyword. Typing "psyc" for example will output "psychology" programs.