Installation#
This guide provides detailed instructions for installing Ex-Fuzzy on different platforms and environments.
Quick Install#
The easiest way to install Ex-Fuzzy is using pip:
pip install ex-fuzzy
This will install Ex-Fuzzy and all required dependencies.
Requirements#
System Requirements#
Python: 3.8 or later
Operating System: Windows, macOS, or Linux
Memory: At least 2GB RAM (4GB+ recommended for large datasets)
Dependencies#
Ex-Fuzzy depends on several well-established scientific Python packages:
Core Dependencies:
Package |
Version |
Purpose |
---|---|---|
numpy |
≥1.19.0 |
Numerical computations and array operations |
pandas |
≥1.3.0 |
Data manipulation and analysis |
scikit-learn |
≥1.0.0 |
Machine learning utilities and metrics |
matplotlib |
≥3.3.0 |
Plotting and visualization |
pymoo |
≥0.6.0 |
Multi-objective evolutionary optimization |
Optional Dependencies:
Package |
Version |
Purpose |
---|---|---|
jupyter |
≥1.0.0 |
For running notebook examples |
seaborn |
≥0.11.0 |
Enhanced statistical visualizations |
plotly |
≥5.0.0 |
Interactive plotting (experimental) |
Installation Methods#
Method 1: Using pip (Recommended)#
Install the latest stable release from PyPI:
pip install ex-fuzzy
To install with optional dependencies:
pip install "ex-fuzzy[viz]" # Enhanced visualization
pip install "ex-fuzzy[jupyter]" # Jupyter notebook support
pip install "ex-fuzzy[all]" # All optional dependencies
Method 2: Using conda#
Note
Conda package is coming soon! For now, use pip even in conda environments.
If you’re using conda, you can still install Ex-Fuzzy with pip:
conda create -n exfuzzy python=3.9
conda activate exfuzzy
pip install ex-fuzzy
Method 3: Development Installation#
For contributors or users who want the latest features:
# Clone the repository
git clone https://github.com/fuminides/ex-fuzzy.git
cd ex-fuzzy
# Install in development mode
pip install -e .
# Or with optional dependencies
pip install -e ".[all]"
This installs Ex-Fuzzy in “editable” mode, so changes to the source code are immediately available.
Method 4: From Source Archive#
Download and install from a source archive:
# Download the latest release
wget https://github.com/fuminides/ex-fuzzy/archive/v1.0.0.tar.gz
tar -xzf v1.0.0.tar.gz
cd ex-fuzzy-1.0.0
# Install
pip install .
Platform-Specific Instructions#
Windows#
Option 1: Using Python from python.org
Download Python 3.8+ from python.org
During installation, check “Add Python to PATH”
Open Command Prompt or PowerShell and run:
pip install ex-fuzzy
Option 2: Using Anaconda
Download Anaconda from anaconda.com
Open Anaconda Prompt and run:
pip install ex-fuzzy
macOS#
Option 1: Using Homebrew
# Install Python if not already installed
brew install python
# Install Ex-Fuzzy
pip3 install ex-fuzzy
Option 2: Using Anaconda
Download Anaconda for macOS
Open Terminal and run:
pip install ex-fuzzy
Linux (Ubuntu/Debian)#
# Install Python and pip if not already installed
sudo apt update
sudo apt install python3 python3-pip
# Install Ex-Fuzzy
pip3 install ex-fuzzy
Linux (CentOS/RHEL/Fedora)#
# Install Python and pip if not already installed
sudo yum install python3 python3-pip # CentOS/RHEL
# OR
sudo dnf install python3 python3-pip # Fedora
# Install Ex-Fuzzy
pip3 install ex-fuzzy
Virtual Environments#
It’s highly recommended to use virtual environments to avoid dependency conflicts:
Using venv (Python built-in)#
# Create virtual environment
python -m venv exfuzzy_env
# Activate it
# On Windows:
exfuzzy_env\\Scripts\\activate
# On macOS/Linux:
source exfuzzy_env/bin/activate
# Install Ex-Fuzzy
pip install ex-fuzzy
Using conda#
# Create conda environment
conda create -n exfuzzy python=3.9
# Activate it
conda activate exfuzzy
# Install Ex-Fuzzy
pip install ex-fuzzy
Using pipenv#
# Install pipenv if not already installed
pip install pipenv
# Create environment and install Ex-Fuzzy
pipenv install ex-fuzzy
# Activate the environment
pipenv shell
Verification#
Test your installation by running this simple Python script:
# test_installation.py
try:
import ex_fuzzy
print(f"✅ Ex-Fuzzy successfully imported!")
print(f"📦 Version: {ex_fuzzy.__version__}")
# Test basic functionality
import ex_fuzzy.fuzzy_sets as fs
import ex_fuzzy.evolutionary_fit as evf
import numpy as np
# Create a simple dataset
X = np.random.rand(100, 4)
y = np.random.randint(0, 3, 100)
# Create a classifier
classifier = evf.BaseFuzzyRulesClassifier(nRules=3, verbose=False)
print("✅ Classifier created successfully!")
print("🎉 Installation test passed!")
except ImportError as e:
print(f"❌ Import error: {e}")
print("Please check your installation.")
except Exception as e:
print(f"⚠️ Warning: {e}")
print("Basic import works, but there might be issues with dependencies.")
Save this as test_installation.py
and run:
python test_installation.py
GPU Support#
Ex-Fuzzy currently runs on CPU only. GPU acceleration is planned for future releases.
Note
While Ex-Fuzzy doesn’t directly use GPUs, some operations may benefit from optimized BLAS libraries like Intel MKL or OpenBLAS, which are automatically used by NumPy when available.
Troubleshooting#
Common Issues#
Issue: pip install ex-fuzzy
fails with permission errors
Solution: Use the --user
flag or a virtual environment:
pip install --user ex-fuzzy
Issue: Import errors related to missing dependencies
Solution: Ensure all dependencies are installed:
pip install numpy pandas scikit-learn matplotlib pymoo
Issue: Older Python version
Solution: Ex-Fuzzy requires Python 3.8+. Upgrade your Python installation:
# Check your Python version
python --version
Issue: Installation fails on Apple Silicon Macs
Solution: Use Rosetta or install dependencies through conda:
# Create conda environment with compatible packages
conda create -n exfuzzy python=3.9
conda activate exfuzzy
conda install numpy pandas scikit-learn matplotlib
pip install pymoo ex-fuzzy
Performance Optimization#
For better performance, consider installing optimized versions of NumPy and SciPy:
Intel-Optimized Packages#
# Uninstall existing numpy/scipy
pip uninstall numpy scipy
# Install Intel-optimized versions
pip install intel-numpy intel-scipy
Or use conda with Intel MKL:
conda install numpy scipy scikit-learn -c intel
Docker Installation#
Use our official Docker image for a consistent environment:
# Pull the image
docker pull exfuzzy/ex-fuzzy:latest
# Run with Jupyter
docker run -p 8888:8888 exfuzzy/ex-fuzzy:latest
Or build your own:
FROM python:3.9-slim
RUN pip install ex-fuzzy[all]
WORKDIR /workspace
CMD ["python"]
Getting Help#
If you encounter issues during installation:
Check the logs: Look for specific error messages in the installation output
Update pip:
pip install --upgrade pip
Clear cache:
pip cache purge
Check dependencies: Ensure all required packages are compatible
Ask for help: Open an issue on GitHub
Next Steps#
Once Ex-Fuzzy is installed, check out:
Getting Started: Learn the basics with a quick tutorial
Examples: See practical examples and use cases
User Guide: Dive deeper into Ex-Fuzzy’s capabilities