Read about this repository here.
-
Clone this repository by
git clone https://github.com/huzefamehidpurwala/Supplier-Python-SQL.git
. -
After successfully cloning the repository change directory by
cd Supplier-Python-SQL
. -
(Optional) Create virtual environment for the project by
python3 -m venv Supplier-Python-SQL_venv
.- If using linux and get any error then install the python3-venv package
sudo apt install -y python3.<version>-venv
here,<version>
should be replaced by the current version of python installed in the system. For ex:sudo apt install -y python3.8-venv
. Now re-execute the above command.
- If using linux and get any error then install the python3-venv package
-
(Necessary if used the above 3rd point) Activate the environment:
- for windows
Supplier-Python-SQL_venv\Scripts\activate
- for linux
Supplier-Python-SQL_venv/bin/activate
- for windows
-
Install necessary python modules by
pip install mysql-connector-python
. -
Open
main.py
in editing mode:- Windows
notepad main.py
- Linux
nano main.py
Enter the "username" and "password" of the mysql having major rights for editing the tables and databases accordingly and save the file.
- Windows
-
Now execute the python script by
python main.py
.
Now you have your database and tables ready to solve SQL Challenge! 🎓