Table of Contents
First of all, you need to download this repository on your machine. You can download this repository as a zip file or use git clone command:
git clone https://github.com/corradosantoro/phidias
We are going to create a virtual environment to contains all the dependencies.
-
Install Python 3 on your system, at the time of writing it is recommended Python 3.9 or newer:
-
Linux (Debian-based):
sudo apt install python3 python3-pip python3-venv
-
Linux (RHEL-based):
sudo dnf install python3 python3-pip
-
Windows and macOS:
Use the proper installer provided on the official Python website
-
-
Create a virtual environment, open a terminal inside the
phidias
folder and execute the following command:python -m venv ./venv
-
Activate the virtual environment:
- Linux (bash shell) or macOS:
source ./venv/bin/activate
- Windows (cmd.exe):
./venv/Scripts/activate.bat
- Linux (bash shell) or macOS:
-
Install the dependencies using:
pip install -r requirements.txt
-
Install the library using:
python setup.py install
Before running any script you need to activate the virtual environment containing the required dependencies:
- Linux (bash shell) or macOS:
source ./venv/bin/activate
- Windows (cmd.exe):
./venv/Scripts/activate.bat
You can now run any provided sample, example:
python ./samples/factorial.py
The PHIDIAS shell will be displayed, you can type the following command:
eShell: main > fact(10)
The program will compute the factorial of 10 and will show:
the resuilting factorial is 3628800