This repository contains a PySide6 application that integrates Python and R functionality using the Inferno R package. Below you will find a detailed step-by-step guide to get the app running locally on your machine. Instructions are provided for Windows, macOS, and Linux.
- Prerequisites
- Set R_HOME Environment Variable (if required)
- Clone the Repository
- Create a Python Virtual Environment
- Install Python Dependencies
- Run the App
- Troubleshooting
- Download the installer from python.org.
- Run the installer, check “Add Python to PATH,” and follow the steps.
- Verify the installation by opening Command Prompt and running:
python --version
- Download the macOS installer from python.org.
- Run the installer and follow the steps.
- Verify:
python3 --version
- Use your distribution's package manager or download the source from python.org. For Ubuntu/Debian, you may need to add a PPA or download a
.tar.xzsource package if Python 3.12 is not in the official repositories yet. - Example (Ubuntu):
sudo apt update sudo apt install python3.12 python3.12-venv python3.12-dev
- Verify:
python3.12 --version
You need to install R and then install the Inferno package from GitHub.
-
Download and install R:
-
Install the
remotespackage within R, then useremotesto install Inferno:- Launch R (e.g., open R.exe on Windows, or run
Rin a terminal). - Run the following lines:
install.packages("remotes") remotes::install_github("pglpm/inferno")
- Close R after the installation completes.
- Launch R (e.g., open R.exe on Windows, or run
On some systems (especially on Windows), you may need to explicitly set the R_HOME environment variable to point to your R installation path.
-
Windows:
- Open Control Panel → System and Security → System → Advanced system settings.
- Click Environment Variables.
- Under System variables, click New (or Edit if R_HOME exists).
- Variable name:
R_HOME - Variable value: Path to your R installation (e.g.,
C:\Program Files\R\R-4.4.2). - Click OK to save.
-
macOS/Linux:
export R_HOME="/usr/local/lib/R"
Adjust the path to match your R installation.
Clone this repository using Git (or simply download the ZIP):
git clone https://github.com/h587916/Inferno-App.git
cd Inferno-AppWindows
python -m venv venv
venv\Scripts\activatemacOS/Linux
python3 -m venv venv
source venv/bin/activateNote: Depending on your system, you may need to use
python3.12instead ofpython3.
Install all required Python dependencies using the requirements.txt file:
pip install -r requirements.txtFinally, start the application:
python main.pyThe PySide6 app should now launch and be ready for use!
- Ensure
R_HOMEis set properly on Windows or that your R binary is discoverable on macOS/Linux.
- Ensure you have the latest versions of pip and setuptools:
pip install --upgrade pip setuptools- Try running terminal or command prompt as administrator (Windows) or use
sudoon Linux/macOS (though generally recommended only if absolutely necessary).
If you encounter errors like:
task 1 failed - "Failed to create the shared library. Run 'printErrors()' to see the compilation errors."or
Sys.which("g++")
[1] ""it means R cannot find the g++ compiler from Rtools. Follow these steps to fix it:
Make sure Rtools 4.4 is installed. Download and install it from: 👉 Rtools 4.4 for Windows
- Open Windows Search → Search for "Environment Variables".
- Click "Edit the system environment variables".
- In System variables, find
Path→ Click Edit. - Click New and add:
C:\rtools44\usr\bin C:\rtools44\x86_64-w64-mingw32.static.posix\bin - Click OK → Restart your computer.
- Open Command Prompt (
Win + R, typecmd, press Enter). - Run:
If successful, it should return:
where g++C:\rtools44\x86_64-w64-mingw32.static.posix\bin\g++.exe
Open R and run:
Sys.which("g++")If this returns a valid path, Rtools is now set up correctly!