Skip to main content

System Requirements

Python Version

Python 3.6 or higher

Operating System

Linux, macOS, or Windows
The scripts were developed and tested using Python 3.6. Ensure you have a compatible Python version installed before proceeding.

Python Dependencies

The project requires the following Python packages:

Core Dependencies

From requirements.txt:
scikit-learn
pandas
matplotlib
Additional dependencies imported in the codebase:
  • numpy - Numerical computing
  • pickle - Data serialization (standard library)
  • argparse - Command-line argument parsing (standard library)

Installation Steps

1

Clone the Repository

Clone the project to your local machine:
git clone <repository-url>
cd CAN-Reverse-Engineering
2

Install Python Packages

Install all required dependencies using pip:
pip install scikit-learn pandas matplotlib numpy
Or install from the requirements file:
pip install -r requirements.txt
pip install numpy
Consider using a virtual environment to isolate project dependencies:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
3

Verify Installation

Verify that all packages are installed correctly:
python -c "import sklearn, pandas, matplotlib, numpy; print('All packages installed successfully')"
Expected output:
All packages installed successfully
4

Navigate to Pipeline Directory

Change to the Pipeline directory where the main scripts are located:
cd Pipeline

Optional: R Setup for EDM Analysis

For advanced Empirical Dynamic Modeling (EDM) analysis, you’ll need to install R and the rEDM package.
1

Install R

Download and install R from CRAN:
  • Linux: sudo apt-get install r-base (Ubuntu/Debian)
  • macOS: Download from CRAN or use Homebrew: brew install r
  • Windows: Download installer from CRAN
2

Install rEDM Package

Open R console and install the rEDM package:
install.packages("rEDM")
For more information, visit U.C. San Diego’s Sugihara Lab

Verification

Check Python Environment

Run this command to verify your Python version:
python --version
Expected output should show Python 3.6 or higher:
Python 3.6.x or higher

Test Script Execution

Verify that the main script can be executed:
python Main.py --help
Expected output:
usage: Main.py [-h] [-c] [filename [filename ...]]

positional arguments:
  filename        filename of CAN log file

optional arguments:
  -h, --help      show this help message and exit
  -c, --can-utils read file in Linux can-utils format

Troubleshooting

Common Issues

This means scikit-learn is not installed. Install it with:
pip install scikit-learn
Install pandas:
pip install pandas
The scripts require Python 3.6+. Check your version:
python --version
If using an older version, install Python 3.6 or higher from python.org
Try using --user flag:
pip install --user scikit-learn pandas matplotlib numpy
Or use a virtual environment to avoid system-wide installation.
As noted in the project documentation:
“These scripts won’t run immediately when cloning this repo.”
Make sure you:
  1. Have all dependencies installed
  2. Have properly formatted CAN log data
  3. Are in the correct directory (Pipeline/)
  4. Have Python 3.6+ available

Getting Help

If you encounter issues not covered here:
  • Post questions in the Open Garages Google Group
  • Check that your CAN data format matches the expected format (see Quickstart guide)
  • Review the example loggerProgram0.log file for proper formatting

Next Steps

Once installation is complete, proceed to the Quickstart Guide to run your first analysis.

Build docs developers (and LLMs) love